| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co
ntroller.h" | 5 #include "components/autofill/core/browser/webdata/autofill_profile_data_type_co
ntroller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "components/autofill/core/browser/personal_data_manager.h" | 9 #include "components/autofill/core/browser/personal_data_manager.h" |
| 10 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 10 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 11 #include "components/sync/api/sync_error.h" | 11 #include "components/sync/api/sync_error.h" |
| 12 #include "components/sync/api/syncable_service.h" | 12 #include "components/sync/api/syncable_service.h" |
| 13 #include "components/sync/driver/sync_client.h" | 13 #include "components/sync/driver/sync_client.h" |
| 14 | 14 |
| 15 using autofill::AutofillWebDataService; | 15 using autofill::AutofillWebDataService; |
| 16 | 16 |
| 17 namespace browser_sync { | 17 namespace browser_sync { |
| 18 | 18 |
| 19 AutofillProfileDataTypeController::AutofillProfileDataTypeController( | 19 AutofillProfileDataTypeController::AutofillProfileDataTypeController( |
| 20 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, | 20 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, |
| 21 const base::Closure& dump_stack, | 21 const base::Closure& dump_stack, |
| 22 sync_driver::SyncClient* sync_client, | 22 syncer::SyncClient* sync_client, |
| 23 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service) | 23 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service) |
| 24 : NonUIDataTypeController(syncer::AUTOFILL_PROFILE, | 24 : NonUIDataTypeController(syncer::AUTOFILL_PROFILE, |
| 25 dump_stack, | 25 dump_stack, |
| 26 sync_client), | 26 sync_client), |
| 27 db_thread_(db_thread), | 27 db_thread_(db_thread), |
| 28 sync_client_(sync_client), | 28 sync_client_(sync_client), |
| 29 web_data_service_(web_data_service), | 29 web_data_service_(web_data_service), |
| 30 callback_registered_(false) {} | 30 callback_registered_(false) {} |
| 31 | 31 |
| 32 syncer::ModelSafeGroup AutofillProfileDataTypeController::model_safe_group() | 32 syncer::ModelSafeGroup AutofillProfileDataTypeController::model_safe_group() |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 | 95 |
| 96 return false; | 96 return false; |
| 97 } | 97 } |
| 98 | 98 |
| 99 void AutofillProfileDataTypeController::StopModels() { | 99 void AutofillProfileDataTypeController::StopModels() { |
| 100 DCHECK(CalledOnValidThread()); | 100 DCHECK(CalledOnValidThread()); |
| 101 sync_client_->GetPersonalDataManager()->RemoveObserver(this); | 101 sync_client_->GetPersonalDataManager()->RemoveObserver(this); |
| 102 } | 102 } |
| 103 | 103 |
| 104 } // namespace browser_sync | 104 } // namespace browser_sync |
| OLD | NEW |