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

Unified Diff: chrome/browser/sync/glue/typed_url_data_type_controller.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/glue/typed_url_data_type_controller.h
diff --git a/chrome/browser/sync/glue/typed_url_data_type_controller.h b/chrome/browser/sync/glue/typed_url_data_type_controller.h
index 650152a998fbda82ad72b817a2c838c5536b2b59..e1076279dd0f8a3ccc2ed5a62893e853febd6fd4 100644
--- a/chrome/browser/sync/glue/typed_url_data_type_controller.h
+++ b/chrome/browser/sync/glue/typed_url_data_type_controller.h
@@ -10,11 +10,9 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "base/prefs/public/pref_change_registrar.h"
+#include "base/prefs/public/pref_observer.h"
#include "chrome/browser/common/cancelable_request.h"
#include "chrome/browser/sync/glue/non_frontend_data_type_controller.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
-#include "content/public/browser/notification_types.h"
class HistoryService;
@@ -28,7 +26,7 @@ class ControlTask;
// A class that manages the startup and shutdown of typed_url sync.
class TypedUrlDataTypeController : public NonFrontendDataTypeController,
- public content::NotificationObserver {
+ public PrefObserver {
public:
TypedUrlDataTypeController(
ProfileSyncComponentsFactory* profile_sync_factory,
@@ -39,10 +37,9 @@ class TypedUrlDataTypeController : public NonFrontendDataTypeController,
virtual syncer::ModelType type() const OVERRIDE;
virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
- // content::NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // PrefObserver implementation.
+ virtual void OnPreferenceChanged(PrefServiceBase* service,
+ const std::string& pref_name) OVERRIDE;
// Invoked on the history thread to set our history backend - must be called
// before CreateSyncComponents() is invoked.
@@ -60,7 +57,6 @@ class TypedUrlDataTypeController : public NonFrontendDataTypeController,
virtual ~TypedUrlDataTypeController();
history::HistoryBackend* backend_;
- content::NotificationRegistrar notification_registrar_;
PrefChangeRegistrar pref_registrar_;
// Helper object to make sure we don't leave tasks running on the history
« no previous file with comments | « chrome/browser/sync/credential_cache_service_win.cc ('k') | chrome/browser/sync/glue/typed_url_data_type_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698