OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/sync/glue/sync_backend_registrar.h" | 5 #include "chrome/browser/sync/glue/sync_backend_registrar.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/message_loop.h" | 11 #include "base/message_loop.h" |
12 #include "chrome/browser/password_manager/password_store_factory.h" | 12 #include "chrome/browser/password_manager/password_store_factory.h" |
13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/sync/engine/passive_model_worker.h" | |
15 #include "chrome/browser/sync/glue/browser_thread_model_worker.h" | 14 #include "chrome/browser/sync/glue/browser_thread_model_worker.h" |
16 #include "chrome/browser/sync/glue/change_processor.h" | 15 #include "chrome/browser/sync/glue/change_processor.h" |
17 #include "chrome/browser/sync/glue/history_model_worker.h" | 16 #include "chrome/browser/sync/glue/history_model_worker.h" |
18 #include "chrome/browser/sync/glue/password_model_worker.h" | 17 #include "chrome/browser/sync/glue/password_model_worker.h" |
19 #include "chrome/browser/sync/glue/ui_model_worker.h" | 18 #include "chrome/browser/sync/glue/ui_model_worker.h" |
20 #include "content/public/browser/browser_thread.h" | 19 #include "content/public/browser/browser_thread.h" |
| 20 #include "sync/engine/passive_model_worker.h" |
21 | 21 |
22 using content::BrowserThread; | 22 using content::BrowserThread; |
23 | 23 |
24 namespace browser_sync { | 24 namespace browser_sync { |
25 | 25 |
26 namespace { | 26 namespace { |
27 | 27 |
28 // Returns true if the current thread is the native thread for the | 28 // Returns true if the current thread is the native thread for the |
29 // given group (or if it is undeterminable). | 29 // given group (or if it is undeterminable). |
30 bool IsOnThreadForGroup(ModelSafeGroup group) { | 30 bool IsOnThreadForGroup(ModelSafeGroup group) { |
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 return it->second; | 279 return it->second; |
280 } | 280 } |
281 | 281 |
282 bool SyncBackendRegistrar::IsCurrentThreadSafeForModel( | 282 bool SyncBackendRegistrar::IsCurrentThreadSafeForModel( |
283 syncable::ModelType model_type) const { | 283 syncable::ModelType model_type) const { |
284 lock_.AssertAcquired(); | 284 lock_.AssertAcquired(); |
285 return IsOnThreadForGroup(GetGroupForModelType(model_type, routing_info_)); | 285 return IsOnThreadForGroup(GetGroupForModelType(model_type, routing_info_)); |
286 } | 286 } |
287 | 287 |
288 } // namespace browser_sync | 288 } // namespace browser_sync |
OLD | NEW |