Index: chrome/browser/sync/glue/data_type_manager.h |
diff --git a/chrome/browser/sync/glue/data_type_manager.h b/chrome/browser/sync/glue/data_type_manager.h |
index dc9872330873dee704db68656c771fab254d2570..8c238042cc0d27517cf925801d3d5d774aff8475 100644 |
--- a/chrome/browser/sync/glue/data_type_manager.h |
+++ b/chrome/browser/sync/glue/data_type_manager.h |
@@ -10,6 +10,7 @@ |
#include <string> |
#include "chrome/browser/sync/glue/data_type_controller.h" |
+#include "chrome/browser/sync/glue/data_type_manager_observer.h" |
#include "sync/api/sync_error.h" |
#include "sync/internal_api/public/base/model_type.h" |
#include "sync/internal_api/public/configure_reason.h" |
@@ -49,11 +50,13 @@ class DataTypeManager { |
UNRECOVERABLE_ERROR // We got an unrecoverable error during startup. |
}; |
+ typedef browser_sync::DataTypeManagerObserver Observer; |
tim (not reviewing)
2012/08/16 18:25:20
I'm tempted to suggest defining the interface as a
Raghu Simha
2012/08/17 01:56:42
:)
How about you review patch set 2 and let me kn
|
typedef syncer::ModelTypeSet TypeSet; |
// Note: |errors| is only filled when status is not OK. |
struct ConfigureResult { |
ConfigureResult(); |
+ explicit ConfigureResult(ConfigureStatus status); |
ConfigureResult(ConfigureStatus status, |
TypeSet requested_types); |
ConfigureResult(ConfigureStatus status, |
@@ -104,8 +107,19 @@ class DataTypeManager { |
// stopped. |
virtual void Stop() = 0; |
+ // Adds/removes an observer. DataTypeManager does not take ownership of |
+ // the observer. |
+ virtual void AddObserver(Observer* observer) = 0; |
+ virtual void RemoveObserver(Observer* observer) = 0; |
+ |
+ // Returns true if |observer| has already been added as an observer. |
+ virtual bool HasObserver(Observer* observer) const = 0; |
+ |
// The current state of the data type manager. |
virtual State state() const = 0; |
+ |
+ // The result of the last configuration attempt. |
+ virtual const ConfigureResult& last_configure_result() const = 0; |
tim (not reviewing)
2012/08/16 18:25:20
As you brought up offline, you can pass this to th
Raghu Simha
2012/08/17 01:56:42
Done.
|
}; |
} // namespace browser_sync |