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

Unified Diff: components/autofill/core/browser/personal_data_manager.cc

Issue 810763008: Make --enable-wallet-card-import (and its absence) more comprehensive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/autofill/core/browser/personal_data_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/personal_data_manager.cc
diff --git a/components/autofill/core/browser/personal_data_manager.cc b/components/autofill/core/browser/personal_data_manager.cc
index dc82d1061dac794ed0099e49564279fb21835547..1eb6c92e5590e2ce90935fac4e58c07bc7ade1ac 100644
--- a/components/autofill/core/browser/personal_data_manager.cc
+++ b/components/autofill/core/browser/personal_data_manager.cc
@@ -8,6 +8,7 @@
#include <functional>
#include <iterator>
+#include "base/command_line.h"
#include "base/i18n/timezone.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
@@ -26,6 +27,7 @@
#include "components/autofill/core/browser/phone_number_i18n.h"
#include "components/autofill/core/browser/validation.h"
#include "components/autofill/core/common/autofill_pref_names.h"
+#include "components/autofill/core/common/autofill_switches.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_data.h"
#include "third_party/libaddressinput/src/cpp/include/libaddressinput/address_formatter.h"
@@ -657,8 +659,11 @@ const std::vector<CreditCard*>& PersonalDataManager::GetCreditCards() const {
credit_cards_.clear();
credit_cards_.insert(credit_cards_.end(), local_credit_cards_.begin(),
local_credit_cards_.end());
- credit_cards_.insert(credit_cards_.end(), server_credit_cards_.begin(),
- server_credit_cards_.end());
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableWalletCardImport)) {
+ credit_cards_.insert(credit_cards_.end(), server_credit_cards_.begin(),
+ server_credit_cards_.end());
+ }
return credit_cards_;
}
« no previous file with comments | « no previous file | components/autofill/core/browser/personal_data_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698