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

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

Issue 12084058: sync/glue: Convert BookmarkDataTypeController to BaseBookmarkModelObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit_tests PASSES Created 7 years, 11 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/bookmark_data_type_controller.h
diff --git a/chrome/browser/sync/glue/bookmark_data_type_controller.h b/chrome/browser/sync/glue/bookmark_data_type_controller.h
index 4456e399ed453a3bbaddc98b5eace61a96f9d95a..bc0587a67389ba31b3898029f5c38c818a632038 100644
--- a/chrome/browser/sync/glue/bookmark_data_type_controller.h
+++ b/chrome/browser/sync/glue/bookmark_data_type_controller.h
@@ -8,6 +8,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "chrome/browser/bookmarks/base_bookmark_model_observer.h"
#include "chrome/browser/sync/glue/frontend_data_type_controller.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -16,7 +17,8 @@ namespace browser_sync {
// A class that manages the startup and shutdown of bookmark sync.
class BookmarkDataTypeController : public FrontendDataTypeController,
- public content::NotificationObserver {
+ public content::NotificationObserver,
+ public BaseBookmarkModelObserver {
public:
BookmarkDataTypeController(
ProfileSyncComponentsFactory* profile_sync_factory,
@@ -26,11 +28,6 @@ class BookmarkDataTypeController : public FrontendDataTypeController,
// FrontendDataTypeController interface.
virtual syncer::ModelType type() const OVERRIDE;
- // content::NotificationObserver interface.
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
private:
virtual ~BookmarkDataTypeController();
@@ -39,9 +36,17 @@ class BookmarkDataTypeController : public FrontendDataTypeController,
virtual void CleanUpState() OVERRIDE;
virtual void CreateSyncComponents() OVERRIDE;
- // Helper that returns true iff both the bookmark model and the history
- // service have finished loading.
- bool DependentsLoaded();
+ // content::NotificationObserver interface.
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
+ // BaseBookmarkModelObserver interface.
+ virtual void BookmarkModelChanged() OVERRIDE;
+ virtual void Loaded(BookmarkModel* model, bool ids_reassigned) OVERRIDE;
+
+ // Helper that returns true iff the history service have finished loading.
+ bool HasHistoryServiceLoaded() const;
content::NotificationRegistrar registrar_;

Powered by Google App Engine
This is Rietveld 408576698