Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1317)

Unified Diff: chrome/browser/metrics/chrome_metrics_service_client.cc

Issue 1282473002: Remove listening of OMNIBOX_OPENED_URL from metrics code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.h ('k') | chrome/browser/metrics/thread_watcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/chrome_metrics_service_client.cc
diff --git a/chrome/browser/metrics/chrome_metrics_service_client.cc b/chrome/browser/metrics/chrome_metrics_service_client.cc
index 3f7a88858d3179153c1d7fed1d3bdb09e27a05ba..63a7cbdb24949722fb6c0580606178dee3647710 100644
--- a/chrome/browser/metrics/chrome_metrics_service_client.cc
+++ b/chrome/browser/metrics/chrome_metrics_service_client.cc
@@ -592,8 +592,11 @@ void ChromeMetricsServiceClient::RegisterForNotifications() {
content::NotificationService::AllSources());
registrar_.Add(this, content::NOTIFICATION_RENDER_WIDGET_HOST_HANG,
content::NotificationService::AllSources());
- registrar_.Add(this, chrome::NOTIFICATION_OMNIBOX_OPENED_URL,
- content::NotificationService::AllSources());
+
+ omnibox_url_opened_subscription_ =
+ OmniboxEventGlobalTracker::GetInstance()->RegisterCallback(
+ base::Bind(&ChromeMetricsServiceClient::OnURLOpenedFromOmnibox,
+ base::Unretained(this)));
}
void ChromeMetricsServiceClient::Observe(
@@ -605,7 +608,6 @@ void ChromeMetricsServiceClient::Observe(
switch (type) {
case chrome::NOTIFICATION_BROWSER_OPENED:
case chrome::NOTIFICATION_BROWSER_CLOSED:
- case chrome::NOTIFICATION_OMNIBOX_OPENED_URL:
case chrome::NOTIFICATION_TAB_PARENTED:
case chrome::NOTIFICATION_TAB_CLOSING:
case content::NOTIFICATION_LOAD_STOP:
@@ -619,3 +621,7 @@ void ChromeMetricsServiceClient::Observe(
NOTREACHED();
}
}
+
+void ChromeMetricsServiceClient::OnURLOpenedFromOmnibox(OmniboxLog* log) {
+ metrics_service_->OnApplicationNotIdle();
+}
« no previous file with comments | « chrome/browser/metrics/chrome_metrics_service_client.h ('k') | chrome/browser/metrics/thread_watcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698