Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 1007003007: Clear wallet data from autofill when disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/personal_data_manager.h" 5 #include "components/autofill/core/browser/personal_data_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <iterator> 9 #include <iterator>
10 10
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 std::map<std::string, int>::iterator iter = 1335 std::map<std::string, int>::iterator iter =
1336 std::max_element(votes.begin(), votes.end(), CompareVotes); 1336 std::max_element(votes.begin(), votes.end(), CompareVotes);
1337 return iter->first; 1337 return iter->first;
1338 } 1338 }
1339 1339
1340 return std::string(); 1340 return std::string();
1341 } 1341 }
1342 1342
1343 void PersonalDataManager::EnabledPrefChanged() { 1343 void PersonalDataManager::EnabledPrefChanged() {
1344 default_country_code_.clear(); 1344 default_country_code_.clear();
1345 if (!pref_service_->GetBoolean(prefs::kAutofillWalletImportEnabled)) {
1346 // Re-mask all server cards when the user turns off wallet card
1347 // integration.
1348 ResetFullServerCards();
1349 }
1345 NotifyPersonalDataChanged(); 1350 NotifyPersonalDataChanged();
1346 } 1351 }
1347 1352
1348 const std::vector<AutofillProfile*>& PersonalDataManager::GetProfiles( 1353 const std::vector<AutofillProfile*>& PersonalDataManager::GetProfiles(
1349 bool record_metrics) const { 1354 bool record_metrics) const {
1350 #if defined(OS_MACOSX) && !defined(OS_IOS) 1355 #if defined(OS_MACOSX) && !defined(OS_IOS)
1351 bool use_auxiliary_profiles = 1356 bool use_auxiliary_profiles =
1352 pref_service_->GetBoolean(prefs::kAutofillUseMacAddressBook); 1357 pref_service_->GetBoolean(prefs::kAutofillUseMacAddressBook);
1353 #else 1358 #else
1354 bool use_auxiliary_profiles = 1359 bool use_auxiliary_profiles =
(...skipping 11 matching lines...) Expand all
1366 } 1371 }
1367 if (IsExperimentalWalletIntegrationEnabled() && 1372 if (IsExperimentalWalletIntegrationEnabled() &&
1368 pref_service_->GetBoolean(prefs::kAutofillWalletImportEnabled)) { 1373 pref_service_->GetBoolean(prefs::kAutofillWalletImportEnabled)) {
1369 profiles_.insert( 1374 profiles_.insert(
1370 profiles_.end(), server_profiles_.begin(), server_profiles_.end()); 1375 profiles_.end(), server_profiles_.begin(), server_profiles_.end());
1371 } 1376 }
1372 return profiles_; 1377 return profiles_;
1373 } 1378 }
1374 1379
1375 } // namespace autofill 1380 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/core/browser/personal_data_manager.h ('k') | components/autofill/core/browser/webdata/autofill_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698