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 CHROME_BROWSER_SYNC_NON_BLOCKING_DATA_TYPE_CONTROLLER_H_ | 5 #ifndef COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_CONTROLLER_H_ |
6 #define CHROME_BROWSER_SYNC_NON_BLOCKING_DATA_TYPE_CONTROLLER_H_ | 6 #define COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_CONTROLLER_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
11 #include "sync/internal_api/public/base/model_type.h" | 11 #include "sync/internal_api/public/base/model_type.h" |
12 #include "sync/internal_api/public/sync_context_proxy.h" | 12 #include "sync/internal_api/public/sync_context_proxy.h" |
13 | 13 |
14 namespace syncer { | 14 namespace syncer { |
15 class ModelTypeSyncProxy; | 15 class ModelTypeSyncProxy; |
16 } | 16 } |
17 | 17 |
18 namespace browser_sync { | 18 namespace sync_driver { |
19 | 19 |
20 // Lives on the UI thread and manages the interactions between many sync | 20 // Lives on the UI thread and manages the interactions between many sync |
21 // components. | 21 // components. |
22 // | 22 // |
23 // There are three main parts to this controller: | 23 // There are three main parts to this controller: |
24 // - The SyncContextProxy, represening the sync thread. | 24 // - The SyncContextProxy, represening the sync thread. |
25 // - The ModelTypeSyncProxy, representing the model type thread. | 25 // - The ModelTypeSyncProxy, representing the model type thread. |
26 // - The user-set state for this type (prefs), which lives on the UI thread. | 26 // - The user-set state for this type (prefs), which lives on the UI thread. |
27 // | 27 // |
28 // The ModelTypeSyncProxy can exist in three different states. Those | 28 // The ModelTypeSyncProxy can exist in three different states. Those |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 scoped_refptr<base::SequencedTaskRunner> task_runner_; | 127 scoped_refptr<base::SequencedTaskRunner> task_runner_; |
128 base::WeakPtr<syncer::ModelTypeSyncProxyImpl> type_sync_proxy_; | 128 base::WeakPtr<syncer::ModelTypeSyncProxyImpl> type_sync_proxy_; |
129 | 129 |
130 // The SyncContextProxy that connects to the current sync backend. May be | 130 // The SyncContextProxy that connects to the current sync backend. May be |
131 // NULL. | 131 // NULL. |
132 scoped_ptr<syncer::SyncContextProxy> sync_context_proxy_; | 132 scoped_ptr<syncer::SyncContextProxy> sync_context_proxy_; |
133 | 133 |
134 DISALLOW_COPY_AND_ASSIGN(NonBlockingDataTypeController); | 134 DISALLOW_COPY_AND_ASSIGN(NonBlockingDataTypeController); |
135 }; | 135 }; |
136 | 136 |
137 } // namespace browser_sync | 137 } // namespace sync_driver |
138 | 138 |
139 #endif // CHROME_BROWSER_SYNC_NON_BLOCKING_DATA_TYPE_CONTROLLER_H_ | 139 #endif // COMPONENTS_SYNC_DRIVER_NON_BLOCKING_DATA_TYPE_CONTROLLER_H_ |
OLD | NEW |