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

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

Issue 1128012: Rewrite DTM to support dynamic data type configuration (Closed)
Patch Set: Address review comments and fix a leak. Created 10 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
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_mock.h ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service.h
diff --git a/chrome/browser/sync/profile_sync_service.h b/chrome/browser/sync/profile_sync_service.h
index 18eca8a21005b8b7cf8221bc2c3ef05539126016..d9d8f65e499be7eb4ed41762f6d1153091d1eac9 100644
--- a/chrome/browser/sync/profile_sync_service.h
+++ b/chrome/browser/sync/profile_sync_service.h
@@ -21,9 +21,15 @@
#include "chrome/browser/sync/sync_setup_wizard.h"
#include "chrome/browser/sync/syncable/model_type.h"
#include "chrome/browser/sync/unrecoverable_error_handler.h"
+#include "chrome/common/notification_observer.h"
+#include "chrome/common/notification_registrar.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest_prod.h"
+class NotificationDetails;
+class NotificationSource;
+class NotificationType;
+
// Various UI components such as the New Tab page can be driven by observing
// the ProfileSyncService through this interface.
class ProfileSyncServiceObserver {
@@ -42,7 +48,8 @@ class ProfileSyncServiceObserver {
// ProfileSyncService is the layer between browser subsystems like bookmarks,
// and the sync backend.
class ProfileSyncService : public browser_sync::SyncFrontend,
- public browser_sync::UnrecoverableErrorHandler {
+ public browser_sync::UnrecoverableErrorHandler,
+ public NotificationObserver {
public:
typedef ProfileSyncServiceObserver Observer;
typedef browser_sync::SyncBackendHost::Status Status;
@@ -202,6 +209,11 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
browser_sync::DataTypeController* data_type_controller,
browser_sync::ChangeProcessor* change_processor);
+ // NotificationObserver implementation.
+ virtual void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
protected:
// Call this after any of the subsystems being synced (the bookmark
// model and the sync backend) finishes its initialization. When everything
@@ -223,9 +235,6 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
void RegisterPreferences();
void ClearPreferences();
- void DataTypeManagerStartCallback(
- browser_sync::DataTypeManager::StartResult result);
-
// Tests need to override this. If |delete_sync_data_folder| is true, then
// this method will delete all previous "Sync Data" folders. (useful if the
// folder is partial/corrupt)
@@ -316,11 +325,6 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
// doing any work that might corrupt things further.
bool unrecoverable_error_detected_;
- // True if at least one of the data types started up was started for
- // the first time. TODO(sync): Remove this when we have full
- // support for starting multiple data types.
- bool startup_had_first_time_;
-
// Which peer-to-peer notification method to use.
browser_sync::NotificationMethod notification_method_;
@@ -329,6 +333,8 @@ class ProfileSyncService : public browser_sync::SyncFrontend,
ObserverList<Observer> observers_;
+ NotificationRegistrar registrar_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileSyncService);
};
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager_mock.h ('k') | chrome/browser/sync/profile_sync_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698