OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/database_model_worker.h" | 5 #include "chrome/browser/sync/glue/database_model_worker.h" |
6 | 6 |
7 #include "base/waitable_event.h" | 7 #include "base/synchronization/waitable_event.h" |
8 #include "chrome/browser/browser_thread.h" | 8 #include "chrome/browser/browser_thread.h" |
9 | 9 |
10 using base::WaitableEvent; | 10 using base::WaitableEvent; |
11 | 11 |
12 namespace browser_sync { | 12 namespace browser_sync { |
13 | 13 |
14 void DatabaseModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { | 14 void DatabaseModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { |
15 if (BrowserThread::CurrentlyOn(BrowserThread::DB)) { | 15 if (BrowserThread::CurrentlyOn(BrowserThread::DB)) { |
16 DLOG(WARNING) << "DoWorkAndWaitUntilDone called from the DB thread."; | 16 DLOG(WARNING) << "DoWorkAndWaitUntilDone called from the DB thread."; |
17 work->Run(); | 17 work->Run(); |
(...skipping 18 matching lines...) Expand all Loading... |
36 | 36 |
37 ModelSafeGroup DatabaseModelWorker::GetModelSafeGroup() { | 37 ModelSafeGroup DatabaseModelWorker::GetModelSafeGroup() { |
38 return GROUP_DB; | 38 return GROUP_DB; |
39 } | 39 } |
40 | 40 |
41 bool DatabaseModelWorker::CurrentThreadIsWorkThread() { | 41 bool DatabaseModelWorker::CurrentThreadIsWorkThread() { |
42 return BrowserThread::CurrentlyOn(BrowserThread::DB); | 42 return BrowserThread::CurrentlyOn(BrowserThread::DB); |
43 } | 43 } |
44 | 44 |
45 } // namespace browser_sync | 45 } // namespace browser_sync |
OLD | NEW |