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

Unified Diff: chrome/browser/sync/credential_cache_service_win.h

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head for commit 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/sync/credential_cache_service_win.h
diff --git a/chrome/browser/sync/credential_cache_service_win.h b/chrome/browser/sync/credential_cache_service_win.h
index 625f608bc58cf087e20a5c6f65dccd7d4d12dd56..1aea150616b745247971dd6117762ec94bc91de8 100644
--- a/chrome/browser/sync/credential_cache_service_win.h
+++ b/chrome/browser/sync/credential_cache_service_win.h
@@ -14,6 +14,7 @@
#include "base/memory/weak_ptr.h"
#include "base/prefs/json_pref_store.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/profiles/profile_keyed_service.h"
#include "chrome/browser/sync/sync_prefs.h"
#include "content/public/browser/notification_observer.h"
@@ -39,7 +40,8 @@ namespace syncer {
// sync using credentials that were cached due to signing in on the other
// (alternate) mode.
class CredentialCacheService : public ProfileKeyedService,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public PrefObserver {
public:
explicit CredentialCacheService(Profile* profile);
virtual ~CredentialCacheService();
@@ -52,6 +54,10 @@ class CredentialCacheService : public ProfileKeyedService,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver implementation.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
+
// Loads cached sync credentials from the alternate profile and applies them
// to the local profile if the load was successful.
void ReadCachedCredentialsFromAlternateProfile();
« no previous file with comments | « chrome/browser/spellchecker/spellcheck_profile.cc ('k') | chrome/browser/sync/credential_cache_service_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698