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()-> | 105 profile_sync_factory()->CreateAutofillSyncComponents( |
106 CreateAutofillSyncComponents( | |
107 profile_sync_service(), | 106 profile_sync_service(), |
108 web_data_service_->GetDatabase(), | 107 web_data_service_->GetDatabase(), |
109 this); | 108 this); |
110 set_model_associator(sync_components.model_associator); | 109 set_model_associator(sync_components.model_associator); |
111 set_change_processor(sync_components.change_processor); | 110 set_change_processor(sync_components.change_processor); |
112 } | 111 } |
113 | 112 |
114 void AutofillDataTypeController::StopModels() { | 113 void AutofillDataTypeController::StopModels() { |
115 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 114 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
116 DCHECK(state() == STOPPING || state() == NOT_RUNNING || state() == DISABLED); | 115 DCHECK(state() == STOPPING || state() == NOT_RUNNING || state() == DISABLED); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 | 157 |
159 PersonalDataManager* AutofillDataTypeController::personal_data() const { | 158 PersonalDataManager* AutofillDataTypeController::personal_data() const { |
160 return personal_data_; | 159 return personal_data_; |
161 } | 160 } |
162 | 161 |
163 WebDataService* AutofillDataTypeController::web_data_service() const { | 162 WebDataService* AutofillDataTypeController::web_data_service() const { |
164 return web_data_service_; | 163 return web_data_service_; |
165 } | 164 } |
166 | 165 |
167 } // namespace browser_sync | 166 } // namespace browser_sync |
OLD | NEW |