OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/shared_change_processor.h" | 5 #include "chrome/browser/sync/glue/shared_change_processor.h" |
6 | 6 |
7 #include "chrome/browser/sync/api/sync_change.h" | 7 #include "chrome/browser/sync/api/sync_change.h" |
8 #include "chrome/browser/sync/glue/generic_change_processor.h" | 8 #include "chrome/browser/sync/glue/generic_change_processor.h" |
9 #include "chrome/browser/sync/profile_sync_factory.h" | 9 #include "chrome/browser/sync/profile_sync_factory.h" |
10 #include "chrome/browser/sync/profile_sync_service.h" | 10 #include "chrome/browser/sync/profile_sync_service.h" |
11 #include "content/public/browser/browser_thread.h" | 11 #include "content/public/browser/browser_thread.h" |
12 | 12 |
13 using base::AutoLock; | 13 using base::AutoLock; |
| 14 using content::BrowserThread; |
14 | 15 |
15 namespace browser_sync { | 16 namespace browser_sync { |
16 | 17 |
17 SharedChangeProcessor::SharedChangeProcessor() | 18 SharedChangeProcessor::SharedChangeProcessor() |
18 : disconnected_(false) { | 19 : disconnected_(false) { |
19 // We're always created on the UI thread. | 20 // We're always created on the UI thread. |
20 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 21 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
21 DetachFromThread(); | 22 DetachFromThread(); |
22 } | 23 } |
23 | 24 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 AutoLock lock(monitor_lock_); | 121 AutoLock lock(monitor_lock_); |
121 if (disconnected_) { | 122 if (disconnected_) { |
122 LOG(ERROR) << "Change processor disconnected."; | 123 LOG(ERROR) << "Change processor disconnected."; |
123 return; | 124 return; |
124 } | 125 } |
125 sync_service->ActivateDataType( | 126 sync_service->ActivateDataType( |
126 model_type, model_safe_group, generic_change_processor_.get()); | 127 model_type, model_safe_group, generic_change_processor_.get()); |
127 } | 128 } |
128 | 129 |
129 } // namespace browser_sync | 130 } // namespace browser_sync |
OLD | NEW |