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

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

Issue 10834351: [sync] Divorce DataTypeManager from NotificationService notifications by creating a new DataTypeMa… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore expectations in DTMImpl unittest + Treat observer_ as const Created 8 years, 4 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.cc ('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 717ab009d516b10ad672329225ddbb9cf4790bf4..da417c056c83e0ac45a870666974c44169da9d3f 100644
--- a/chrome/browser/sync/glue/data_type_manager_impl.h
+++ b/chrome/browser/sync/glue/data_type_manager_impl.h
@@ -21,12 +21,14 @@
namespace browser_sync {
class DataTypeController;
+class DataTypeManagerObserver;
class DataTypeManagerImpl : public DataTypeManager,
public ModelAssociationResultProcessor {
public:
DataTypeManagerImpl(BackendDataTypeConfigurer* configurer,
- const DataTypeController::TypeMap* controllers);
+ const DataTypeController::TypeMap* controllers,
+ DataTypeManagerObserver* observer);
virtual ~DataTypeManagerImpl();
// DataTypeManager interface.
@@ -90,7 +92,7 @@ class DataTypeManagerImpl : public DataTypeManager,
// The |last_requested_types_| will reflect the newest set of requested types.
bool needs_reconfigure_;
- // The reason for the last reconfigure attempt. Not this will be set to a
+ // The reason for the last reconfigure attempt. Note: this will be set to a
// valid value only when |needs_reconfigure_| is set.
syncer::ConfigureReason last_configure_reason_;
@@ -109,6 +111,10 @@ class DataTypeManagerImpl : public DataTypeManager,
std::list<syncer::SyncError> failed_datatypes_info_;
ModelAssociationManager model_association_manager_;
+ // DataTypeManager must have only one observer -- the ProfileSyncService that
+ // created it and manages its lifetime.
+ DataTypeManagerObserver* const observer_;
+
DISALLOW_COPY_AND_ASSIGN(DataTypeManagerImpl);
};
« no previous file with comments | « chrome/browser/sync/glue/data_type_manager.cc ('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