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

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

Issue 11414083: Remove PrefObserver usage, batch 9. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to sort-of good revision (r169014). Created 8 years, 1 month 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 4d8b4a8935c26d056b45ac46e2d4cb5bdc7f614e..f555991c6039decab782901f7f605602a1ba30fe 100644
--- a/chrome/browser/profiles/gaia_info_update_service.cc
+++ b/chrome/browser/profiles/gaia_info_update_service.cc
@@ -32,7 +32,9 @@ const int kMinUpdateIntervalSeconds = 5;
GAIAInfoUpdateService::GAIAInfoUpdateService(Profile* profile)
: profile_(profile) {
PrefService* prefs = profile_->GetPrefs();
- username_pref_.Init(prefs::kGoogleServicesUsername, prefs, this);
+ username_pref_.Init(prefs::kGoogleServicesUsername, prefs,
+ base::Bind(&GAIAInfoUpdateService::OnUsernameChanged,
+ base::Unretained(this)));
last_updated_ = base::Time::FromInternalValue(
prefs->GetInt64(prefs::kProfileGAIAInfoUpdateTime));
@@ -164,12 +166,6 @@ void GAIAInfoUpdateService::OnProfileDownloadFailure(
ScheduleNextUpdate();
}
-void GAIAInfoUpdateService::OnPreferenceChanged(PrefServiceBase* service,
- const std::string& pref_name) {
- if (prefs::kGoogleServicesUsername == pref_name)
- OnUsernameChanged();
-}
-
void GAIAInfoUpdateService::OnUsernameChanged() {
ProfileInfoCache& cache =
g_browser_process->profile_manager()->GetProfileInfoCache();
« no previous file with comments | « chrome/browser/profiles/gaia_info_update_service.h ('k') | chrome/browser/safe_browsing/safe_browsing_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698