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/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; |
(...skipping 16 matching lines...) Expand all Loading... |
27 done.Wait(); | 27 done.Wait(); |
28 } | 28 } |
29 | 29 |
30 void DatabaseModelWorker::CallDoWorkAndSignalTask(Callback0::Type* work, | 30 void DatabaseModelWorker::CallDoWorkAndSignalTask(Callback0::Type* work, |
31 WaitableEvent* done) { | 31 WaitableEvent* done) { |
32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 32 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
33 work->Run(); | 33 work->Run(); |
34 done->Signal(); | 34 done->Signal(); |
35 } | 35 } |
36 | 36 |
| 37 ModelSafeGroup DatabaseModelWorker::GetModelSafeGroup() { |
| 38 return GROUP_DB; |
| 39 } |
| 40 |
37 bool DatabaseModelWorker::CurrentThreadIsWorkThread() { | 41 bool DatabaseModelWorker::CurrentThreadIsWorkThread() { |
38 return BrowserThread::CurrentlyOn(BrowserThread::DB); | 42 return BrowserThread::CurrentlyOn(BrowserThread::DB); |
39 } | 43 } |
40 | 44 |
41 } // namespace browser_sync | 45 } // namespace browser_sync |
OLD | NEW |