1 // Copyright (c) 2013 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 CHROME_BROWSER_SYNC_GLUE_PROXY_DATA_TYPE_CONTROLLER_H__
6 #define CHROME_BROWSER_SYNC_GLUE_PROXY_DATA_TYPE_CONTROLLER_H__
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "chrome/browser/sync/glue/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(syncer::ModelType type);
21 // DataTypeController interface.
22 virtual void LoadModels(
23 const ModelLoadCallback& model_load_callback) OVERRIDE;
24 virtual void StartAssociating(const StartCallback& start_callback) OVERRIDE;
25 virtual void Stop() OVERRIDE;
26 virtual syncer::ModelType type() const OVERRIDE;
27 virtual syncer::ModelSafeGroup model_safe_group() const OVERRIDE;
28 virtual std::string name() const OVERRIDE;
29 virtual State state() const OVERRIDE;
31 // DataTypeErrorHandler interface.
32 virtual void OnSingleDatatypeUnrecoverableError(
33 const tracked_objects::Location& from_here,
34 const std::string& message) OVERRIDE;
37 // DataTypeController is RefCounted.
38 virtual ~ProxyDataTypeController();
40 // DataTypeController interface.
41 virtual void OnModelLoaded() OVERRIDE;
46 // The actual type for this controller.
47 syncer::ModelType type_;
49 DISALLOW_COPY_AND_ASSIGN(ProxyDataTypeController);
52 } // namespace browser_sync
54 #endif // CHROME_BROWSER_SYNC_GLUE_PROXY_DATA_TYPE_CONTROLLER_H__