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..4bc275bb71720e74d01f6eadb956b6ca0ad004bd 100644 |
--- a/chrome/browser/sync/glue/data_type_manager_impl.h |
+++ b/chrome/browser/sync/glue/data_type_manager_impl.h |
@@ -14,6 +14,7 @@ |
#include "base/basictypes.h" |
#include "base/compiler_specific.h" |
#include "base/memory/weak_ptr.h" |
+#include "base/observer_list.h" |
#include "base/time.h" |
#include "chrome/browser/sync/glue/backend_data_type_configurer.h" |
#include "chrome/browser/sync/glue/model_association_manager.h" |
@@ -33,6 +34,14 @@ class DataTypeManagerImpl : public DataTypeManager, |
virtual void Configure(TypeSet desired_types, |
syncer::ConfigureReason reason) OVERRIDE; |
+ // Adds/removes an observer. DataTypeManager does not take ownership of |
+ // the observer. |
+ virtual void AddObserver(Observer* observer) OVERRIDE; |
+ virtual void RemoveObserver(Observer* observer) OVERRIDE; |
+ |
+ // Returns true if |observer| has already been added as an observer. |
+ virtual bool HasObserver(Observer* observer) const OVERRIDE; |
+ |
// Needed only for backend migration. |
virtual void ConfigureWithoutNigori( |
TypeSet desired_types, |
@@ -40,6 +49,7 @@ class DataTypeManagerImpl : public DataTypeManager, |
virtual void Stop() OVERRIDE; |
virtual State state() const OVERRIDE; |
+ virtual const ConfigureResult& last_configure_result() const OVERRIDE; |
// |ModelAssociationResultProcessor| implementation. |
virtual void OnModelAssociationDone( |
@@ -90,10 +100,13 @@ 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_; |
+ // The result of the last configure attempt. |
+ ConfigureResult last_configure_result_; |
+ |
base::WeakPtrFactory<DataTypeManagerImpl> weak_ptr_factory_; |
// The last time Restart() was called. |
@@ -109,6 +122,8 @@ class DataTypeManagerImpl : public DataTypeManager, |
std::list<syncer::SyncError> failed_datatypes_info_; |
ModelAssociationManager model_association_manager_; |
+ ObserverList<Observer> observers_; |
+ |
DISALLOW_COPY_AND_ASSIGN(DataTypeManagerImpl); |
}; |