OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/options/autofill_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/autofill_options_handler.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 | 333 |
334 localized_strings->SetString("helpUrl", autofill::kHelpURL); | 334 localized_strings->SetString("helpUrl", autofill::kHelpURL); |
335 | 335 |
336 personal_data_ = autofill::PersonalDataManagerFactory::GetForProfile( | 336 personal_data_ = autofill::PersonalDataManagerFactory::GetForProfile( |
337 Profile::FromWebUI(web_ui())); | 337 Profile::FromWebUI(web_ui())); |
338 | 338 |
339 SetAddressOverlayStrings(localized_strings); | 339 SetAddressOverlayStrings(localized_strings); |
340 SetCreditCardOverlayStrings(localized_strings); | 340 SetCreditCardOverlayStrings(localized_strings); |
341 | 341 |
342 localized_strings->SetBoolean( | 342 localized_strings->SetBoolean( |
343 "enableAutofillWalletIntegration", | 343 "enableAutofillWalletIntegration", false); |
344 personal_data_->IsExperimentalWalletIntegrationEnabled()); | |
345 localized_strings->SetString( | 344 localized_strings->SetString( |
346 "manageWalletAddressesUrl", | 345 "manageWalletAddressesUrl", |
347 autofill::wallet::GetManageAddressesUrl(0).spec()); | 346 autofill::wallet::GetManageAddressesUrl(0).spec()); |
348 localized_strings->SetString( | 347 localized_strings->SetString( |
349 "manageWalletPaymentMethodsUrl", | 348 "manageWalletPaymentMethodsUrl", |
350 autofill::wallet::GetManageInstrumentsUrl(0).spec()); | 349 autofill::wallet::GetManageInstrumentsUrl(0).spec()); |
351 } | 350 } |
352 | 351 |
353 void AutofillOptionsHandler::InitializeHandler() { | 352 void AutofillOptionsHandler::InitializeHandler() { |
354 // personal_data_ is NULL in guest mode on Chrome OS. | 353 // personal_data_ is NULL in guest mode on Chrome OS. |
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 scoped_ptr<base::ListValue> components(new base::ListValue); | 732 scoped_ptr<base::ListValue> components(new base::ListValue); |
734 GetAddressComponents( | 733 GetAddressComponents( |
735 base::UTF16ToUTF8(profile.GetRawInfo(autofill::ADDRESS_HOME_COUNTRY)), | 734 base::UTF16ToUTF8(profile.GetRawInfo(autofill::ADDRESS_HOME_COUNTRY)), |
736 profile.language_code(), | 735 profile.language_code(), |
737 components.get(), | 736 components.get(), |
738 NULL); | 737 NULL); |
739 address->Set(kComponents, components.release()); | 738 address->Set(kComponents, components.release()); |
740 } | 739 } |
741 | 740 |
742 } // namespace options | 741 } // namespace options |
OLD | NEW |