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

Unified Diff: components/sync/driver/data_type_controller.h

Issue 2276943006: [USS] Move GetAllNodes from backend to controller (Closed)
Patch Set: Created 4 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
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 7035b5dcb78b8dc994a0c4529f7368b64a008558..b1414b3c62812190ad84b6eb4ceb93ea6453eab4 100644
--- a/components/sync/driver/data_type_controller.h
+++ b/components/sync/driver/data_type_controller.h
@@ -12,6 +12,7 @@
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/ref_counted_delete_on_message_loop.h"
+#include "base/memory/scoped_vector.h"
#include "base/sequenced_task_runner_helpers.h"
#include "components/sync/base/model_type.h"
#include "components/sync/base/unrecoverable_error_handler.h"
@@ -75,6 +76,9 @@ class DataTypeController
typedef base::Callback<void(syncer::ModelType, syncer::SyncError)>
ModelLoadCallback;
+ typedef base::Callback<void(const std::vector<syncer::ModelType>& type,
maxbogue 2016/08/25 23:38:59 It would make more sense if the callback was just
Gang Wu 2016/08/26 16:48:04 Done.
+ ScopedVector<base::ListValue>)>
+ AllNodesCallback;
typedef std::map<syncer::ModelType, scoped_refptr<DataTypeController>>
TypeMap;
@@ -153,6 +157,9 @@ class DataTypeController
// Returns true by default.
virtual bool ReadyForStart() const;
+ virtual void GetAllNodes(scoped_refptr<base::SequencedTaskRunner> task_runner,
maxbogue 2016/08/25 23:38:59 You don't need the task runner here, either. This
Gang Wu 2016/08/26 16:48:04 Done.
+ const AllNodesCallback& callback) = 0;
+
protected:
friend class base::RefCountedDeleteOnMessageLoop<DataTypeController>;
friend class base::DeleteHelper<DataTypeController>;

Powered by Google App Engine
This is Rietveld 408576698