Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Side by Side Diff: chrome/browser/sync/glue/sync_backend_registrar.cc

Issue 8437002: Move BrowserThread to content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: A few updates. Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #include "chrome/browser/sync/glue/sync_backend_registrar.h" 5 #include "chrome/browser/sync/glue/sync_backend_registrar.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstddef> 8 #include <cstddef>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/message_loop.h" 12 #include "base/message_loop.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/browser/sync/glue/browser_thread_model_worker.h" 14 #include "chrome/browser/sync/glue/browser_thread_model_worker.h"
15 #include "chrome/browser/sync/glue/change_processor.h" 15 #include "chrome/browser/sync/glue/change_processor.h"
16 #include "chrome/browser/sync/glue/history_model_worker.h" 16 #include "chrome/browser/sync/glue/history_model_worker.h"
17 #include "chrome/browser/sync/glue/password_model_worker.h" 17 #include "chrome/browser/sync/glue/password_model_worker.h"
18 #include "chrome/browser/sync/glue/ui_model_worker.h" 18 #include "chrome/browser/sync/glue/ui_model_worker.h"
19 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
20 20
21 using content::BrowserThread;
22
21 namespace browser_sync { 23 namespace browser_sync {
22 24
23 namespace { 25 namespace {
24 26
25 // Returns true if the current thread is the native thread for the 27 // Returns true if the current thread is the native thread for the
26 // given group (or if it is undeterminable). 28 // given group (or if it is undeterminable).
27 bool IsOnThreadForGroup(ModelSafeGroup group) { 29 bool IsOnThreadForGroup(ModelSafeGroup group) {
28 switch (group) { 30 switch (group) {
29 case GROUP_PASSIVE: 31 case GROUP_PASSIVE:
30 return false; 32 return false;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 return it->second; 284 return it->second;
283 } 285 }
284 286
285 bool SyncBackendRegistrar::IsCurrentThreadSafeForModel( 287 bool SyncBackendRegistrar::IsCurrentThreadSafeForModel(
286 syncable::ModelType model_type) const { 288 syncable::ModelType model_type) const {
287 lock_.AssertAcquired(); 289 lock_.AssertAcquired();
288 return IsOnThreadForGroup(GetGroupForModelType(model_type, routing_info_)); 290 return IsOnThreadForGroup(GetGroupForModelType(model_type, routing_info_));
289 } 291 }
290 292
291 } // namespace browser_sync 293 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_host_unittest.cc ('k') | chrome/browser/sync/glue/sync_backend_registrar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698