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

Unified Diff: chrome/browser/sync/glue/autofill_profile_data_type_controller.h

Issue 12476031: Refactor notifications of chrome/browser/webdata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 7 years, 9 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/sync/glue/autofill_profile_data_type_controller.h
diff --git a/chrome/browser/sync/glue/autofill_profile_data_type_controller.h b/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
index 031d6afe0d4946a553861ab559bbd75df481f135..b1d602d67eefb5fb83f9edca860e075dd205b460 100644
--- a/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
+++ b/chrome/browser/sync/glue/autofill_profile_data_type_controller.h
@@ -7,20 +7,19 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/sync/glue/non_ui_data_type_controller.h"
+#include "chrome/browser/webdata/web_data_service_observer.h"
#include "components/autofill/browser/personal_data_manager_observer.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
class PersonalDataManager;
class WebDataService;
namespace browser_sync {
-class AutofillProfileDataTypeController
- : public NonUIDataTypeController,
- public content::NotificationObserver,
- public PersonalDataManagerObserver {
+class AutofillProfileDataTypeController : public NonUIDataTypeController,
+ public WebDataServiceObserver,
+ public PersonalDataManagerObserver {
public:
AutofillProfileDataTypeController(
ProfileSyncComponentsFactory* profile_sync_factory,
@@ -31,10 +30,8 @@ class AutofillProfileDataTypeController
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;
+ // WebDataServiceObserver implementation.
+ virtual void WebDatabaseLoaded() OVERRIDE;
// PersonalDataManagerObserver implementation:
virtual void OnPersonalDataChanged() OVERRIDE;
@@ -52,7 +49,8 @@ class AutofillProfileDataTypeController
private:
PersonalDataManager* personal_data_;
scoped_refptr<WebDataService> web_data_service_;
- content::NotificationRegistrar notification_registrar_;
+ ScopedObserver<WebDataService, AutofillProfileDataTypeController>
+ scoped_observer_;
DISALLOW_COPY_AND_ASSIGN(AutofillProfileDataTypeController);
};

Powered by Google App Engine
This is Rietveld 408576698