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

Unified Diff: components/omnibox/browser/omnibox_client.h

Issue 1278433002: Eliminate OmniboxMetricsProvider listening to notification (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@componentize_omnibox
Patch Set: 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
Index: components/omnibox/browser/omnibox_client.h
diff --git a/components/omnibox/browser/omnibox_client.h b/components/omnibox/browser/omnibox_client.h
index e9c34f8e3b9a43c8eea8b569f363a12523b39065..8352f2ac6b11efa2d09b652581551eea163a51d1 100644
--- a/components/omnibox/browser/omnibox_client.h
+++ b/components/omnibox/browser/omnibox_client.h
@@ -137,11 +137,15 @@ class OmniboxClient {
// Called to notify clients that a URL was opened from the omnibox.
// TODO(blundell): Eliminate this method in favor of having all //chrome-
- // level listeners of the OMNIBOX_OPENED_URL instead observe OmniboxEditModel.
- // Note that this is not trivial because (a) most of those listeners listen
- // for the notification from all Profiles and (b) the notification is also
- // sent from AutocompleteControllerAndroid, and it's unclear which listeners
- // are also listening from it being sent from there.
+ // level listeners of the OMNIBOX_OPENED_URL instead either (a) observe
+ // OmniboxEditModel if they were listening for the notification for a single
+ // Profile, or (b) observe OmniboxEventGlobalTracker if they were listening
+ // for the notification from all Profiles. Note however that (a) in
+ // particular is not trivial: the notification is also sent from
+ // AutocompleteControllerAndroid, and it's unclear which listeners are also
+ // listening from it being sent from there. For (b) this is not a problem, as
+ // AutocompleteControllerAndroid calls out to OmniboxEventGlobalTracker at the
+ // same time that it sends the notification.
virtual void OnURLOpenedFromOmnibox(OmniboxLog* log) = 0;
// Called when a bookmark is launched from the omnibox.

Powered by Google App Engine
This is Rietveld 408576698