Skip to content

Commit a3ac2ff

Browse files
authored
Revert "cobalt/browser/metrics: Skeleton CobaltMetricsServiceClient " (youtube#5000)
This reverts commit 2339500 (34934). Broke Chrobalt-ATv run. Bug: b/400441729
1 parent ffe0f69 commit a3ac2ff

File tree

7 files changed

+5
-422
lines changed

7 files changed

+5
-422
lines changed

cobalt/BUILD.gn

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,10 @@ action("cobalt_build_info") {
8484
test("cobalt_unittests") {
8585
testonly = true
8686

87-
sources = [
88-
"//cobalt/browser/metrics/cobalt_metrics_service_client_test.cc",
89-
"//cobalt/user_agent/user_agent_platform_info_test.cc",
90-
]
87+
sources = [ "//cobalt/user_agent/user_agent_platform_info_test.cc" ]
9188

9289
deps = [
9390
"//base/test:run_all_unittests",
94-
"//base/test:test_support",
95-
"//cobalt/browser:metrics",
9691
"//cobalt/user_agent",
9792
"//starboard:starboard_group",
9893
"//testing/gmock",

cobalt/android/BUILD.gn

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ template("content_shell_apk_tmpl") {
266266

267267
# Copied from target: libcontent_shell_content_view
268268
# TODO(b/376867565) rename this library, NO shell
269-
source_set("libcobalt_content_shell_content_view") {
269+
shared_library("libcobalt_content_shell_content_view") {
270270
# TODO(b/375655377): remove testonly
271271
testonly = true
272272
deps = [
@@ -299,6 +299,7 @@ source_set("libcobalt_content_shell_content_view") {
299299
"//cobalt/cobalt_main_delegate.h",
300300
"cobalt_library_loader.cc",
301301
]
302+
configs -= [ "//build/config/android:hide_all_but_jni_onload" ]
302303
configs += [ "//build/config/android:hide_all_but_jni" ]
303304
}
304305

cobalt/browser/BUILD.gn

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ source_set("browser") {
3939

4040
deps = [
4141
":embed_polyfilled_javascript",
42-
":metrics",
4342
"//cobalt/browser/crash_annotator/public/mojom",
4443
"//cobalt/browser/h5vcc_runtime",
4544
"//cobalt/browser/h5vcc_runtime/public/mojom",
@@ -51,8 +50,6 @@ source_set("browser") {
5150
"//components/js_injection/browser:browser",
5251
"//components/os_crypt/sync",
5352
"//content/public/browser",
54-
55-
# TODO(b/390021478): Do not depend on content_shell_lib here.
5653
"//content/shell:content_shell_lib",
5754
]
5855

@@ -88,21 +85,3 @@ action("embed_polyfilled_javascript") {
8885
rebase_path("embedded_resources", root_build_dir),
8986
]
9087
}
91-
92-
source_set("metrics") {
93-
# TODO(cobalt, b/375655377): remove testonly declaration, needed because of
94-
# being depended-on by :browser above.
95-
testonly = true
96-
97-
sources = [
98-
"metrics/cobalt_metrics_service_client.cc",
99-
"metrics/cobalt_metrics_service_client.h",
100-
]
101-
deps = [
102-
"//components/metrics",
103-
"//components/prefs",
104-
"//components/variations",
105-
"//content/public/browser",
106-
"//url",
107-
]
108-
}

cobalt/browser/cobalt_content_browser_client.cc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "base/i18n/rtl.h"
2121
#include "cobalt/browser/cobalt_browser_interface_binders.h"
2222
#include "cobalt/browser/cobalt_web_contents_observer.h"
23-
#include "cobalt/browser/metrics/cobalt_metrics_service_client.h"
2423
#include "cobalt/media/service/mojom/video_geometry_setter.mojom.h"
2524
#include "cobalt/user_agent/user_agent_platform_info.h"
2625
#include "content/public/browser/browser_thread.h"
@@ -88,11 +87,8 @@ class CobaltBrowserMainParts : public content::ShellBrowserMainParts {
8887

8988
// ShellBrowserMainParts overrides.
9089
int PreCreateThreads() override {
91-
metrics_ = std::make_unique<CobaltMetricsServiceClient>();
92-
// TODO(b/372559349): Double check that this initializes UMA collection,
93-
// similar to what ChromeBrowserMainParts::StartMetricsRecording() does.
94-
// It might need to be moved to other parts, e.g. PreMainMessageLoopRun().
95-
metrics_->Start();
90+
// TODO(b/372559349): setup metrics similarly to what SetupMetrics() does
91+
// when called from ChromeBrowserMainParts::PreCreateThreadsImpl().
9692
return ShellBrowserMainParts::PreCreateThreads();
9793
}
9894

@@ -130,9 +126,6 @@ class CobaltBrowserMainParts : public content::ShellBrowserMainParts {
130126
ShellBrowserMainParts::PostCreateMainMessageLoop();
131127
}
132128
#endif // BUILDFLAG(IS_LINUX)
133-
134-
private:
135-
std::unique_ptr<CobaltMetricsServiceClient> metrics_;
136129
};
137130

138131
std::string GetCobaltUserAgent() {

cobalt/browser/metrics/cobalt_metrics_service_client.cc

Lines changed: 0 additions & 240 deletions
This file was deleted.

0 commit comments

Comments
 (0)