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

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

Issue 11958029: [Sync] Add support for proxy types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments and rename local -> virtual Created 7 years, 11 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: chrome/browser/sync/glue/virtual_data_type_controller.h
diff --git a/chrome/browser/sync/glue/virtual_data_type_controller.h b/chrome/browser/sync/glue/virtual_data_type_controller.h
new file mode 100644
index 0000000000000000000000000000000000000000..1c7ffb46400631d1b5c4be3312239ad43dbe2154
--- /dev/null
+++ b/chrome/browser/sync/glue/virtual_data_type_controller.h
@@ -0,0 +1,54 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_SYNC_GLUE_VIRTUAL_DATA_TYPE_CONTROLLER_H__
+#define CHROME_BROWSER_SYNC_GLUE_VIRTUAL_DATA_TYPE_CONTROLLER_H__
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "chrome/browser/sync/glue/data_type_controller.h"
+
+namespace browser_sync {
+
+// Implementation for virtual datatypes. These are datatype that have no
+// representation in sync, and therefore no change processor or syncable
+// service.
+class VirtualDataTypeController : public DataTypeController {
+ public:
+ explicit VirtualDataTypeController(syncer::ModelType type);
+
+ // DataTypeController interface.
+ virtual void LoadModels(
+ const ModelLoadCallback& model_load_callback) OVERRIDE;
+ virtual void StartAssociating(const StartCallback& start_callback) OVERRIDE;
+ virtual void Stop() OVERRIDE;
+ virtual syncer::ModelType type() const OVERRIDE;
+ virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
+ virtual std::string name() const OVERRIDE;
+ virtual State state() const OVERRIDE;
+
+ // DataTypeErrorHandler interface.
+ virtual void OnSingleDatatypeUnrecoverableError(
+ const tracked_objects::Location& from_here,
+ const std::string& message) OVERRIDE;
+
+ protected:
+ // DataTypeController is RefCounted.
+ virtual ~VirtualDataTypeController();
+
+ // DataTypeController interface.
+ virtual void OnModelLoaded() OVERRIDE;
+
+ private:
+ State state_;
+
+ // The actual type for this controller.
+ syncer::ModelType type_;
+
+ DISALLOW_COPY_AND_ASSIGN(VirtualDataTypeController);
+};
+
+} // namespace browser_sync
+
+#endif // CHROME_BROWSER_SYNC_GLUE_VIRTUAL_DATA_TYPE_CONTROLLER_H__

Powered by Google App Engine
This is Rietveld 408576698