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

Unified Diff: chrome/browser/profiles/gaia_info_update_service.cc

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR. Created 8 years, 2 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: chrome/browser/profiles/gaia_info_update_service.cc
diff --git a/chrome/browser/profiles/gaia_info_update_service.cc b/chrome/browser/profiles/gaia_info_update_service.cc
index efd51885f85c0e2abb42af3c0026400c493257f7..4d8b4a8935c26d056b45ac46e2d4cb5bdc7f614e 100644
--- a/chrome/browser/profiles/gaia_info_update_service.cc
+++ b/chrome/browser/profiles/gaia_info_update_service.cc
@@ -164,17 +164,10 @@ void GAIAInfoUpdateService::OnProfileDownloadFailure(
ScheduleNextUpdate();
}
-void GAIAInfoUpdateService::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- if (type == chrome::NOTIFICATION_PREF_CHANGED) {
- std::string* name = content::Details<std::string>(details).ptr();
- if (prefs::kGoogleServicesUsername == *name)
- OnUsernameChanged();
- } else {
- NOTREACHED();
- }
+void GAIAInfoUpdateService::OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) {
+ if (prefs::kGoogleServicesUsername == pref_name)
+ OnUsernameChanged();
}
void GAIAInfoUpdateService::OnUsernameChanged() {

Powered by Google App Engine
This is Rietveld 408576698