OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_CONTROLLER_H__ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_CONTROLLER_H__ |
6 #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_CONTROLLER_H__ | 6 #define CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_CONTROLLER_H__ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/message_loop_helpers.h" |
14 #include "chrome/browser/sync/engine/model_safe_worker.h" | 15 #include "chrome/browser/sync/engine/model_safe_worker.h" |
15 #include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.
h" | 16 #include "chrome/browser/sync/internal_api/includes/unrecoverable_error_handler.
h" |
16 #include "chrome/browser/sync/syncable/model_type.h" | 17 #include "chrome/browser/sync/syncable/model_type.h" |
17 #include "content/public/browser/browser_thread.h" | 18 #include "content/public/browser/browser_thread.h" |
18 | 19 |
19 class SyncError; | 20 class SyncError; |
20 | 21 |
21 namespace browser_sync { | 22 namespace browser_sync { |
22 | 23 |
23 // Data type controllers need to be refcounted threadsafe, as they may | 24 // Data type controllers need to be refcounted threadsafe, as they may |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 // thread that should be used to modify the data type's native | 88 // thread that should be used to modify the data type's native |
88 // model. | 89 // model. |
89 virtual browser_sync::ModelSafeGroup model_safe_group() const = 0; | 90 virtual browser_sync::ModelSafeGroup model_safe_group() const = 0; |
90 | 91 |
91 // Current state of the data type controller. | 92 // Current state of the data type controller. |
92 virtual State state() const = 0; | 93 virtual State state() const = 0; |
93 | 94 |
94 protected: | 95 protected: |
95 friend struct content::BrowserThread::DeleteOnThread< | 96 friend struct content::BrowserThread::DeleteOnThread< |
96 content::BrowserThread::UI>; | 97 content::BrowserThread::UI>; |
97 friend class DeleteTask<DataTypeController>; | 98 friend class base::DeleteHelper<DataTypeController>; |
98 friend class ShutdownTask; | |
99 | 99 |
100 virtual ~DataTypeController() {} | 100 virtual ~DataTypeController() {} |
101 }; | 101 }; |
102 | 102 |
103 } // namespace browser_sync | 103 } // namespace browser_sync |
104 | 104 |
105 #endif // CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_CONTROLLER_H__ | 105 #endif // CHROME_BROWSER_SYNC_GLUE_DATA_TYPE_CONTROLLER_H__ |
OLD | NEW |