OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #if defined(BROWSER_SYNC) | |
6 | |
7 #include "chrome/browser/sync/glue/bookmark_model_worker.h" | 5 #include "chrome/browser/sync/glue/bookmark_model_worker.h" |
8 | 6 |
9 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
10 #include "base/waitable_event.h" | 8 #include "base/waitable_event.h" |
11 | 9 |
12 namespace browser_sync { | 10 namespace browser_sync { |
13 | 11 |
14 void BookmarkModelWorker::CallDoWorkFromModelSafeThreadAndWait( | 12 void BookmarkModelWorker::CallDoWorkFromModelSafeThreadAndWait( |
15 ModelSafeWorkerInterface::Visitor* visitor) { | 13 ModelSafeWorkerInterface::Visitor* visitor) { |
16 // It is possible this gets called when we are in the STOPPING state, because | 14 // It is possible this gets called when we are in the STOPPING state, because |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // get run twice. | 101 // get run twice. |
104 visitor_ = NULL; | 102 visitor_ = NULL; |
105 | 103 |
106 // Notify the BookmarkModelWorker that scheduled us that we have run | 104 // Notify the BookmarkModelWorker that scheduled us that we have run |
107 // successfully. | 105 // successfully. |
108 scheduler_->OnTaskCompleted(); | 106 scheduler_->OnTaskCompleted(); |
109 work_done_->Signal(); // Unblock the syncer thread that scheduled us. | 107 work_done_->Signal(); // Unblock the syncer thread that scheduled us. |
110 } | 108 } |
111 | 109 |
112 } // namespace browser_sync | 110 } // namespace browser_sync |
113 | |
114 #endif // defined(BROWSER_SYNC) | |
OLD | NEW |