Chromium Code Reviews| 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()); |