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

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

Issue 1571863002: Update the Payments integration setting now that it now governs uploads. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary parameter and update unit tests Created 4 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
Index: components/autofill/core/browser/options_util.cc
diff --git a/components/autofill/core/browser/options_util.cc b/components/autofill/core/browser/options_util.cc
index b162d7767394ebb10874c228efd1a969aab0049e..0f9d37f79617deeeed90c4a07eea0d509cbc1ce8 100644
--- a/components/autofill/core/browser/options_util.cc
+++ b/components/autofill/core/browser/options_util.cc
@@ -4,7 +4,6 @@
#include "components/autofill/core/browser/options_util.h"
-#include "base/prefs/pref_service.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/common/autofill_pref_names.h"
#include "components/sync_driver/sync_service.h"
@@ -13,28 +12,13 @@ namespace autofill {
bool WalletIntegrationAvailable(
sync_driver::SyncService* sync_service,
- const PrefService& pref_service,
const PersonalDataManager& personal_data_manager) {
if (!(sync_service && sync_service->CanSyncStart() &&
sync_service->GetPreferredDataTypes().Has(syncer::AUTOFILL_PROFILE))) {
return false;
}
- if (!personal_data_manager.IsExperimentalWalletIntegrationEnabled())
- return false;
-
- // If the user is signed in and the feature is enabled, but no data is being
- // synced, hide the option. The user doesn't have a Wallet account. If the
- // feature is disabled, we can't know, so show the checkbox.
- if (!pref_service.GetBoolean(prefs::kAutofillWalletImportEnabled))
- return true;
-
- // If wallet is preferred but we haven't gotten the sync data yet, we don't
- // know, so show the checkbox.
- if (!sync_service->GetActiveDataTypes().Has(syncer::AUTOFILL_WALLET_DATA))
- return true;
-
- return personal_data_manager.HasServerData();
+ return personal_data_manager.IsExperimentalWalletIntegrationEnabled();
}
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698