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/autofill_data_type_controller.h" | 5 #include "chrome/browser/sync/glue/autofill_data_type_controller.h" |
6 | 6 |
7 #include "base/metrics/histogram.h" | 7 #include "base/metrics/histogram.h" |
8 #include "base/task.h" | 8 #include "base/task.h" |
9 #include "chrome/browser/autofill/personal_data_manager.h" | 9 #include "chrome/browser/autofill/personal_data_manager.h" |
10 #include "chrome/browser/autofill/personal_data_manager_factory.h" | 10 #include "chrome/browser/autofill/personal_data_manager_factory.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 return BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, | 95 return BrowserThread::PostTask(BrowserThread::DB, FROM_HERE, |
96 NewRunnableMethod( | 96 NewRunnableMethod( |
97 this, | 97 this, |
98 &AutofillDataTypeController::StartAssociation)); | 98 &AutofillDataTypeController::StartAssociation)); |
99 } | 99 } |
100 | 100 |
101 void AutofillDataTypeController::CreateSyncComponents() { | 101 void AutofillDataTypeController::CreateSyncComponents() { |
102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); | 102 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::DB)); |
103 DCHECK_EQ(state(), ASSOCIATING); | 103 DCHECK_EQ(state(), ASSOCIATING); |
104 ProfileSyncFactory::SyncComponents sync_components = | 104 ProfileSyncFactory::SyncComponents sync_components = |
105 profile_sync_factory()->CreateAutofillSyncComponents( | 105 profile_sync_factory()-> |
| 106 CreateAutofillSyncComponents( |
106 profile_sync_service(), | 107 profile_sync_service(), |
107 web_data_service_->GetDatabase(), | 108 web_data_service_->GetDatabase(), |
108 this); | 109 this); |
109 set_model_associator(sync_components.model_associator); | 110 set_model_associator(sync_components.model_associator); |
110 set_change_processor(sync_components.change_processor); | 111 set_change_processor(sync_components.change_processor); |
111 } | 112 } |
112 | 113 |
113 void AutofillDataTypeController::StopModels() { | 114 void AutofillDataTypeController::StopModels() { |
114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 115 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
115 DCHECK(state() == STOPPING || state() == NOT_RUNNING || state() == DISABLED); | 116 DCHECK(state() == STOPPING || state() == NOT_RUNNING || state() == DISABLED); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 158 |
158 PersonalDataManager* AutofillDataTypeController::personal_data() const { | 159 PersonalDataManager* AutofillDataTypeController::personal_data() const { |
159 return personal_data_; | 160 return personal_data_; |
160 } | 161 } |
161 | 162 |
162 WebDataService* AutofillDataTypeController::web_data_service() const { | 163 WebDataService* AutofillDataTypeController::web_data_service() const { |
163 return web_data_service_; | 164 return web_data_service_; |
164 } | 165 } |
165 | 166 |
166 } // namespace browser_sync | 167 } // namespace browser_sync |
OLD | NEW |