| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/autofill_wallet_data_type_controller.
h" | 5 #include "components/autofill/core/browser/autofill_wallet_data_type_controller.
h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "components/autofill/core/browser/personal_data_manager.h" | 8 #include "components/autofill/core/browser/personal_data_manager.h" |
| 9 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" | 9 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" |
| 10 #include "components/autofill/core/common/autofill_pref_names.h" | 10 #include "components/autofill/core/common/autofill_pref_names.h" |
| 11 #include "components/prefs/pref_service.h" | 11 #include "components/prefs/pref_service.h" |
| 12 #include "components/sync/api/sync_error.h" | |
| 13 #include "components/sync/api/syncable_service.h" | |
| 14 #include "components/sync/driver/sync_client.h" | 12 #include "components/sync/driver/sync_client.h" |
| 15 #include "components/sync/driver/sync_service.h" | 13 #include "components/sync/driver/sync_service.h" |
| 14 #include "components/sync/model/sync_error.h" |
| 15 #include "components/sync/model/syncable_service.h" |
| 16 | 16 |
| 17 namespace browser_sync { | 17 namespace browser_sync { |
| 18 | 18 |
| 19 AutofillWalletDataTypeController::AutofillWalletDataTypeController( | 19 AutofillWalletDataTypeController::AutofillWalletDataTypeController( |
| 20 syncer::ModelType type, | 20 syncer::ModelType type, |
| 21 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, | 21 const scoped_refptr<base::SingleThreadTaskRunner>& db_thread, |
| 22 const base::Closure& dump_stack, | 22 const base::Closure& dump_stack, |
| 23 syncer::SyncClient* sync_client, | 23 syncer::SyncClient* sync_client, |
| 24 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service) | 24 const scoped_refptr<autofill::AutofillWebDataService>& web_data_service) |
| 25 : NonUIDataTypeController(type, dump_stack, sync_client), | 25 : NonUIDataTypeController(type, dump_stack, sync_client), |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 | 124 |
| 125 bool AutofillWalletDataTypeController::IsEnabled() { | 125 bool AutofillWalletDataTypeController::IsEnabled() { |
| 126 DCHECK(CalledOnValidThread()); | 126 DCHECK(CalledOnValidThread()); |
| 127 | 127 |
| 128 // Require the user-visible pref to be enabled to sync Wallet data/metadata. | 128 // Require the user-visible pref to be enabled to sync Wallet data/metadata. |
| 129 PrefService* ps = sync_client_->GetPrefService(); | 129 PrefService* ps = sync_client_->GetPrefService(); |
| 130 return ps->GetBoolean(autofill::prefs::kAutofillWalletImportEnabled); | 130 return ps->GetBoolean(autofill::prefs::kAutofillWalletImportEnabled); |
| 131 } | 131 } |
| 132 | 132 |
| 133 } // namespace browser_sync | 133 } // namespace browser_sync |
| OLD | NEW |