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

Unified Diff: chrome/browser/webdata/autocomplete_syncable_service.h

Issue 12476031: Refactor notifications of chrome/browser/webdata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase again 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/webdata/autocomplete_syncable_service.h
diff --git a/chrome/browser/webdata/autocomplete_syncable_service.h b/chrome/browser/webdata/autocomplete_syncable_service.h
index 3a0a5c9cd90f4b25fdf3f7c6b8901b93a2932286..8b9dac6c0221909d1f78fe264857239dc4e90684 100644
--- a/chrome/browser/webdata/autocomplete_syncable_service.h
+++ b/chrome/browser/webdata/autocomplete_syncable_service.h
@@ -16,8 +16,7 @@
#include "chrome/browser/webdata/autofill_change.h"
#include "chrome/browser/webdata/autofill_entry.h"
#include "chrome/browser/webdata/web_data_service.h"
-#include "content/public/browser/notification_observer.h"
-#include "content/public/browser/notification_registrar.h"
+#include "chrome/browser/webdata/web_data_service_observer.h"
#include "sync/api/sync_change.h"
#include "sync/api/sync_data.h"
#include "sync/api/sync_error.h"
@@ -39,10 +38,9 @@ class AutofillSpecifics;
// ProcessSyncChanges() and for each local change Observe() is called.
// TODO(georgey) : remove reliance on the notifications and make it to be called
// from web_data_service directly.
-class AutocompleteSyncableService
- : public syncer::SyncableService,
- public content::NotificationObserver,
- public base::NonThreadSafe {
+class AutocompleteSyncableService : public syncer::SyncableService,
+ public WebDataServiceObserver,
+ public base::NonThreadSafe {
public:
explicit AutocompleteSyncableService(WebDataService* web_data_service);
virtual ~AutocompleteSyncableService();
@@ -62,10 +60,9 @@ class AutocompleteSyncableService
const tracked_objects::Location& from_here,
const syncer::SyncChangeList& change_list) OVERRIDE;
- // NotificationObserver implementation.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
+ // WebDataServiceObserver implementation.
+ virtual void AutofillEntriesChanged(const AutofillChangeList& changes)
dhollowa 2013/03/12 22:22:28 nit: wrap at the arg, not at the OVERRIDE.
kaiwang 2013/03/13 04:57:20 Done.
+ OVERRIDE;
// Called via sync to tell us if we should cull expired entries when merging
// and/or processing sync changes.
@@ -138,8 +135,6 @@ class AutocompleteSyncableService
// |web_data_service_| passed to it.
WebDataService* web_data_service_;
- content::NotificationRegistrar notification_registrar_;
-
// We receive ownership of |sync_processor_| in MergeDataAndStartSyncing() and
// destroy it in StopSyncing().
scoped_ptr<syncer::SyncChangeProcessor> sync_processor_;

Powered by Google App Engine
This is Rietveld 408576698