| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__ | 5 #ifndef COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__ |
| 6 #define COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__ | 6 #define COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/single_thread_task_runner.h" |
| 10 #include "components/sync_driver/data_type_controller.h" | 11 #include "components/sync_driver/data_type_controller.h" |
| 11 | 12 |
| 12 namespace sync_driver { | 13 namespace sync_driver { |
| 13 | 14 |
| 14 // Implementation for proxy datatypes. These are datatype that have no | 15 // Implementation for proxy datatypes. These are datatype that have no |
| 15 // representation in sync, and therefore no change processor or syncable | 16 // representation in sync, and therefore no change processor or syncable |
| 16 // service. | 17 // service. |
| 17 class ProxyDataTypeController : public DataTypeController { | 18 class ProxyDataTypeController : public DataTypeController { |
| 18 public: | 19 public: |
| 19 explicit ProxyDataTypeController( | 20 explicit ProxyDataTypeController( |
| 20 scoped_refptr<base::MessageLoopProxy> ui_thread, | 21 scoped_refptr<base::SingleThreadTaskRunner> ui_thread, |
| 21 syncer::ModelType type); | 22 syncer::ModelType type); |
| 22 | 23 |
| 23 // DataTypeController interface. | 24 // DataTypeController interface. |
| 24 void LoadModels(const ModelLoadCallback& model_load_callback) override; | 25 void LoadModels(const ModelLoadCallback& model_load_callback) override; |
| 25 void StartAssociating(const StartCallback& start_callback) override; | 26 void StartAssociating(const StartCallback& start_callback) override; |
| 26 void Stop() override; | 27 void Stop() override; |
| 27 syncer::ModelType type() const override; | 28 syncer::ModelType type() const override; |
| 28 syncer::ModelSafeGroup model_safe_group() const override; | 29 syncer::ModelSafeGroup model_safe_group() const override; |
| 29 ChangeProcessor* GetChangeProcessor() const override; | 30 ChangeProcessor* GetChangeProcessor() const override; |
| 30 std::string name() const override; | 31 std::string name() const override; |
| 31 State state() const override; | 32 State state() const override; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 46 | 47 |
| 47 // The actual type for this controller. | 48 // The actual type for this controller. |
| 48 syncer::ModelType type_; | 49 syncer::ModelType type_; |
| 49 | 50 |
| 50 DISALLOW_COPY_AND_ASSIGN(ProxyDataTypeController); | 51 DISALLOW_COPY_AND_ASSIGN(ProxyDataTypeController); |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 } // namespace sync_driver | 54 } // namespace sync_driver |
| 54 | 55 |
| 55 #endif // COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__ | 56 #endif // COMPONENTS_SYNC_DRIVER_PROXY_DATA_TYPE_CONTROLLER_H__ |
| OLD | NEW |