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

Unified Diff: chrome/browser/google/google_url_tracker.h

Issue 284343003: Elimate NOTIFICATION_GOOGLE_URL_UPDATED (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 7 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/chrome_notification_types.h ('k') | chrome/browser/google/google_url_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google/google_url_tracker.h
diff --git a/chrome/browser/google/google_url_tracker.h b/chrome/browser/google/google_url_tracker.h
index bce07e4cfa7f7ba208a6fbbf671525cc0940943e..0b1ca97133e3050b6b099d4744614d2ae49879d3 100644
--- a/chrome/browser/google/google_url_tracker.h
+++ b/chrome/browser/google/google_url_tracker.h
@@ -39,9 +39,9 @@ class InfoBar;
//
// Most consumers should only call GoogleURL(), which is guaranteed to
// synchronously return a value at all times (even during startup or in unittest
-// mode). Consumers who need to be notified when things change should listen to
-// the notification service for NOTIFICATION_GOOGLE_URL_UPDATED, which provides
-// the original and updated values.
+// mode). Consumers who need to be notified when things change should register
+// a callback that provides the original and updated values via
+// RegisterCallback().
//
// To protect users' privacy and reduce server load, no updates will be
// performed (ever) unless at least one consumer registers interest by calling
@@ -56,9 +56,6 @@ class GoogleURLTracker : public net::URLFetcherDelegate,
typedef base::CallbackList<void(GURL, GURL)> CallbackList;
typedef CallbackList::Subscription Subscription;
- // The contents of the Details for a NOTIFICATION_GOOGLE_URL_UPDATED.
- typedef std::pair<GURL, GURL> UpdatedDetails;
-
// The constructor does different things depending on which of these values
// you pass it. Hopefully these are self-explanatory.
enum Mode {
@@ -211,8 +208,8 @@ class GoogleURLTracker : public net::URLFetcherDelegate,
bool need_to_fetch_; // True if a consumer actually wants us to fetch an
// updated URL. If this is never set, we won't
// bother to fetch anything.
- // Consumers should observe
- // chrome::NOTIFICATION_GOOGLE_URL_UPDATED.
+ // Consumers should register a callback via
+ // RegisterCallback().
bool need_to_prompt_; // True if the last fetched Google URL is not
// matched with current user's default Google URL
// nor the last prompted Google URL.
« no previous file with comments | « chrome/browser/chrome_notification_types.h ('k') | chrome/browser/google/google_url_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698