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

Unified Diff: chrome/browser/sync/glue/data_type_manager_impl.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.h ('k') | chrome/browser/sync/glue/data_type_manager_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/data_type_manager_impl.h
diff --git a/chrome/browser/sync/glue/data_type_manager_impl.h b/chrome/browser/sync/glue/data_type_manager_impl.h
index 623c8f5de4211786f4314365b25d153275b5a2b1..b8be7715da6dd42df8653c216ba434528a42e232 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.h
+++ b/chrome/browser/sync/glue/data_type_manager_impl.h
@@ -7,6 +7,9 @@
#include "chrome/browser/sync/glue/data_type_manager.h"
+#include <map>
+#include <vector>
+
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "chrome/common/notification_observer.h"
@@ -18,6 +21,7 @@ class NotificationDetails;
namespace browser_sync {
+class DataTypeController;
class SyncBackendHost;
class DataTypeManagerImpl : public DataTypeManager,
@@ -28,14 +32,10 @@ class DataTypeManagerImpl : public DataTypeManager,
virtual ~DataTypeManagerImpl() {}
// DataTypeManager interface.
- virtual void Start(StartCallback* start_callback);
+ virtual void Configure(const TypeSet& desired_types);
virtual void Stop();
- virtual bool IsRegistered(syncable::ModelType type);
-
- virtual bool IsEnabled(syncable::ModelType type);
-
virtual const DataTypeController::TypeMap& controllers() {
return controllers_;
};
@@ -61,15 +61,24 @@ class DataTypeManagerImpl : public DataTypeManager,
// Stops all data types.
void FinishStop();
+ void Restart();
void AddObserver(NotificationType type);
void RemoveObserver(NotificationType type);
+ void NotifyStart();
+ void NotifyDone(ConfigureResult result);
+ void ResumeSyncer();
+ void PauseSyncer();
SyncBackendHost* backend_;
+ // Map of all data type controllers that are available for sync.
+ // This list is determined at startup by various command line flags.
DataTypeController::TypeMap controllers_;
State state_;
- int current_type_;
+ DataTypeController* current_dtc_;
+ std::map<syncable::ModelType, int> start_order_;
+ std::vector<DataTypeController*> needs_start_;
+ std::vector<DataTypeController*> needs_stop_;
- scoped_ptr<StartCallback> start_callback_;
NotificationRegistrar notification_registrar_;
DISALLOW_COPY_AND_ASSIGN(DataTypeManagerImpl);
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager.h ('k') | chrome/browser/sync/glue/data_type_manager_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698