OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_SYNC_GLUE_UI_MODEL_WORKER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_GLUE_UI_MODEL_WORKER_H_ |
6 #define CHROME_BROWSER_SYNC_GLUE_UI_MODEL_WORKER_H_ | 6 #define CHROME_BROWSER_SYNC_GLUE_UI_MODEL_WORKER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/synchronization/condition_variable.h" | 11 #include "base/synchronization/condition_variable.h" |
12 #include "base/synchronization/lock.h" | 12 #include "base/synchronization/lock.h" |
13 #include "sync/internal_api/public/engine/model_safe_worker.h" | 13 #include "sync/internal_api/public/engine/model_safe_worker.h" |
14 #include "sync/util/unrecoverable_error_info.h" | 14 #include "sync/internal_api/public/util/unrecoverable_error_info.h" |
15 | 15 |
16 class MessageLoop; | 16 class MessageLoop; |
17 | 17 |
18 namespace browser_sync { | 18 namespace browser_sync { |
19 | 19 |
20 // A ModelSafeWorker for UI models (e.g. bookmarks) that accepts work requests | 20 // A ModelSafeWorker for UI models (e.g. bookmarks) that accepts work requests |
21 // from the syncapi that need to be fulfilled from the MessageLoop home to the | 21 // from the syncapi that need to be fulfilled from the MessageLoop home to the |
22 // native model. | 22 // native model. |
23 // | 23 // |
24 // Lifetime note: Instances of this class will generally be owned by the | 24 // Lifetime note: Instances of this class will generally be owned by the |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 // SyncerThread has terminated. We only care about (1) when we are in Stop(), | 96 // SyncerThread has terminated. We only care about (1) when we are in Stop(), |
97 // because we have to manually Run() the task. | 97 // because we have to manually Run() the task. |
98 base::ConditionVariable syncapi_event_; | 98 base::ConditionVariable syncapi_event_; |
99 | 99 |
100 DISALLOW_COPY_AND_ASSIGN(UIModelWorker); | 100 DISALLOW_COPY_AND_ASSIGN(UIModelWorker); |
101 }; | 101 }; |
102 | 102 |
103 } // namespace browser_sync | 103 } // namespace browser_sync |
104 | 104 |
105 #endif // CHROME_BROWSER_SYNC_GLUE_UI_MODEL_WORKER_H_ | 105 #endif // CHROME_BROWSER_SYNC_GLUE_UI_MODEL_WORKER_H_ |
OLD | NEW |