1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__
6 #define COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "components/sync_driver/data_type_controller.h"
12 namespace browser_sync {
14 // Implementation for proxy datatypes. These are datatype that have no
15 // representation in sync, and therefore no change processor or syncable
17 class ProxyDataTypeController : public DataTypeController {
19 explicit ProxyDataTypeController(
20 scoped_refptr<base::MessageLoopProxy> ui_thread,
21 syncer::ModelType type);
23 // DataTypeController interface.
24 virtual void LoadModels(
25 const ModelLoadCallback& model_load_callback) OVERRIDE;
26 virtual void StartAssociating(const StartCallback& start_callback) OVERRIDE;
27 virtual void Stop() OVERRIDE;
28 virtual syncer::ModelType type() const OVERRIDE;
29 virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
30 virtual std::string name() const OVERRIDE;
31 virtual State state() const OVERRIDE;
33 // DataTypeErrorHandler interface.
34 virtual void OnSingleDatatypeUnrecoverableError(
35 const tracked_objects::Location& from_here,
36 const std::string& message) OVERRIDE;
39 // DataTypeController is RefCounted.
40 virtual ~ProxyDataTypeController();
42 // DataTypeController interface.
43 virtual void OnModelLoaded() OVERRIDE;
48 // The actual type for this controller.
49 syncer::ModelType type_;
51 DISALLOW_COPY_AND_ASSIGN(ProxyDataTypeController);
54 } // namespace browser_sync
56 #endif // COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__