Chromium Code Reviews| Index: components/sync/driver/data_type_controller.h |
| diff --git a/components/sync/driver/data_type_controller.h b/components/sync/driver/data_type_controller.h |
| index 437c87301064129c1cd83939f3b280d8dc2b3913..2f7f45826f432136aeaebc12df77d926befc5928 100644 |
| --- a/components/sync/driver/data_type_controller.h |
| +++ b/components/sync/driver/data_type_controller.h |
| @@ -16,6 +16,7 @@ |
| #include "components/sync/api/data_type_error_handler.h" |
| #include "components/sync/base/model_type.h" |
| #include "components/sync/base/unrecoverable_error_handler.h" |
| +#include "components/sync/engine/cycle/status_counters.h" |
| namespace syncer { |
| class SyncError; |
| @@ -74,6 +75,9 @@ class DataTypeController : public base::SupportsWeakPtr<DataTypeController> { |
| std::unique_ptr<base::ListValue>)> |
| AllNodesCallback; |
| + typedef base::Callback<void(syncer::ModelType, const syncer::StatusCounters&)> |
| + StatusCountersCallback; |
| + |
| typedef std::map<syncer::ModelType, std::unique_ptr<DataTypeController>> |
| TypeMap; |
| typedef std::map<syncer::ModelType, DataTypeController::State> StateMap; |
| @@ -151,6 +155,12 @@ class DataTypeController : public base::SupportsWeakPtr<DataTypeController> { |
| // Used for populating nodes in Sync Node Browser of chrome://sync-internals. |
| virtual void GetAllNodes(const AllNodesCallback& callback) = 0; |
| + // Returns StatusCounters representing the counters for this data type to |
|
pavely
2016/10/03 21:40:14
Alternative for first sentence:
Collects StatusCou
Gang Wu
2016/10/06 00:20:22
Done.
|
| + // |OnStatusCountersUpdated|, and |OnStatusCountersUpdated| will pass the |
| + // StatusCounters through |callback|. |
| + // Used for display counters in chrome://sync-internals. |
| + virtual void GetStatusCounters(const StatusCountersCallback& callback) = 0; |
| + |
| protected: |
| DataTypeController(syncer::ModelType type, const base::Closure& dump_stack); |