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

Unified Diff: chrome/browser/ui/webui/options/autofill_options_handler.cc

Issue 950003002: Show Autofill/Wallet options only when signed in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pdm Created 5 years, 10 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 | « chrome/browser/autofill/android/personal_data_manager_android.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/options/autofill_options_handler.cc
diff --git a/chrome/browser/ui/webui/options/autofill_options_handler.cc b/chrome/browser/ui/webui/options/autofill_options_handler.cc
index 4bda089d4fddff1027a79203c9923d7c34fc8428..5eb7645584e05539ac553277e6f4470a073e405c 100644
--- a/chrome/browser/ui/webui/options/autofill_options_handler.cc
+++ b/chrome/browser/ui/webui/options/autofill_options_handler.cc
@@ -18,6 +18,8 @@
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/ui/autofill/country_combobox_model.h"
#include "chrome/common/url_constants.h"
#include "chrome/grit/generated_resources.h"
@@ -339,8 +341,13 @@ void AutofillOptionsHandler::GetLocalizedValues(
SetAddressOverlayStrings(localized_strings);
SetCreditCardOverlayStrings(localized_strings);
+ ProfileSyncService* service =
+ ProfileSyncServiceFactory::GetInstance()->GetForProfile(
+ Profile::FromWebUI(web_ui()));
localized_strings->SetBoolean(
- "enableAutofillWalletIntegration", false);
+ "enableAutofillWalletIntegration",
+ service->IsSyncEnabledAndLoggedIn() &&
+ personal_data_->IsExperimentalWalletIntegrationEnabled());
stevenjb 2015/02/26 23:26:11 It looks like personal_data_ is tested elsewhere i
localized_strings->SetString(
"manageWalletAddressesUrl",
autofill::wallet::GetManageAddressesUrl(0).spec());
« no previous file with comments | « chrome/browser/autofill/android/personal_data_manager_android.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698