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/history_model_worker.h" | 5 #include "chrome/browser/sync/glue/history_model_worker.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #include "base/ref_counted.h" | 8 #include "base/ref_counted.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "base/waitable_event.h" | 10 #include "base/waitable_event.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 HistoryModelWorker::~HistoryModelWorker() { | 43 HistoryModelWorker::~HistoryModelWorker() { |
44 } | 44 } |
45 | 45 |
46 void HistoryModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { | 46 void HistoryModelWorker::DoWorkAndWaitUntilDone(Callback0::Type* work) { |
47 WaitableEvent done(false, false); | 47 WaitableEvent done(false, false); |
48 scoped_refptr<WorkerTask> task(new WorkerTask(work, &done)); | 48 scoped_refptr<WorkerTask> task(new WorkerTask(work, &done)); |
49 history_service_->ScheduleDBTask(task.get(), this); | 49 history_service_->ScheduleDBTask(task.get(), this); |
50 done.Wait(); | 50 done.Wait(); |
51 } | 51 } |
52 | 52 |
| 53 ModelSafeGroup HistoryModelWorker::GetModelSafeGroup() { |
| 54 return GROUP_HISTORY; |
| 55 } |
| 56 |
53 bool HistoryModelWorker::CurrentThreadIsWorkThread() { | 57 bool HistoryModelWorker::CurrentThreadIsWorkThread() { |
54 // TODO(ncarter): How to determine this? | 58 // TODO(ncarter): How to determine this? |
55 return true; | 59 return true; |
56 } | 60 } |
57 | 61 |
58 } // namespace browser_sync | 62 } // namespace browser_sync |
OLD | NEW |