| 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_UI_DATA_TYPE_CONTROLLER_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_UI_DATA_TYPE_CONTROLLER_H_ |
| 6 #define COMPONENTS_SYNC_DRIVER_UI_DATA_TYPE_CONTROLLER_H_ | 6 #define COMPONENTS_SYNC_DRIVER_UI_DATA_TYPE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "components/sync_driver/data_type_controller.h" | 14 #include "components/sync_driver/data_type_controller.h" |
| 15 #include "components/sync_driver/shared_change_processor.h" | 15 #include "components/sync_driver/shared_change_processor.h" |
| 16 | 16 |
| 17 namespace base { | 17 namespace base { |
| 18 class TimeDelta; | 18 class TimeDelta; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace syncer { | 21 namespace syncer { |
| 22 class SyncableService; | 22 class SyncableService; |
| 23 class SyncError; | 23 class SyncError; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace browser_sync { | 26 namespace sync_driver { |
| 27 | 27 |
| 28 // Implementation for datatypes that reside on the (UI thread). This is the same | 28 // Implementation for datatypes that reside on the (UI thread). This is the same |
| 29 // thread we perform initialization on, so we don't have to worry about thread | 29 // thread we perform initialization on, so we don't have to worry about thread |
| 30 // safety. The main start/stop funtionality is implemented by default. | 30 // safety. The main start/stop funtionality is implemented by default. |
| 31 // Note: RefCountedThreadSafe by way of DataTypeController. | 31 // Note: RefCountedThreadSafe by way of DataTypeController. |
| 32 class UIDataTypeController : public DataTypeController { | 32 class UIDataTypeController : public DataTypeController { |
| 33 public: | 33 public: |
| 34 UIDataTypeController( | 34 UIDataTypeController( |
| 35 scoped_refptr<base::MessageLoopProxy> ui_thread, | 35 scoped_refptr<base::MessageLoopProxy> ui_thread, |
| 36 const base::Closure& error_callback, | 36 const base::Closure& error_callback, |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 scoped_refptr<base::MessageLoopProxy> ui_thread_; | 126 scoped_refptr<base::MessageLoopProxy> ui_thread_; |
| 127 private: | 127 private: |
| 128 // Associate the sync model with the service's model, then start syncing. | 128 // Associate the sync model with the service's model, then start syncing. |
| 129 virtual void Associate(); | 129 virtual void Associate(); |
| 130 | 130 |
| 131 virtual void AbortModelLoad(); | 131 virtual void AbortModelLoad(); |
| 132 | 132 |
| 133 DISALLOW_COPY_AND_ASSIGN(UIDataTypeController); | 133 DISALLOW_COPY_AND_ASSIGN(UIDataTypeController); |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 } // namespace browser_sync | 136 } // namespace sync_driver |
| 137 | 137 |
| 138 #endif // COMPONENTS_SYNC_DRIVER_UI_DATA_TYPE_CONTROLLER_H_ | 138 #endif // COMPONENTS_SYNC_DRIVER_UI_DATA_TYPE_CONTROLLER_H_ |
| OLD | NEW |