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

Side by Side Diff: chrome/browser/ui/autofill/data_model_wrapper.cc

Issue 157093002: rAc - hardcode wallet billing address to US in i18n mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: else Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/autofill/data_model_wrapper.h" 5 #include "chrome/browser/ui/autofill/data_model_wrapper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 18 matching lines...) Expand all
29 namespace autofill { 29 namespace autofill {
30 30
31 using base::ASCIIToUTF16; 31 using base::ASCIIToUTF16;
32 using base::UTF16ToUTF8; 32 using base::UTF16ToUTF8;
33 33
34 DataModelWrapper::~DataModelWrapper() {} 34 DataModelWrapper::~DataModelWrapper() {}
35 35
36 void DataModelWrapper::FillInputs(DetailInputs* inputs) { 36 void DataModelWrapper::FillInputs(DetailInputs* inputs) {
37 for (size_t i = 0; i < inputs->size(); ++i) { 37 for (size_t i = 0; i < inputs->size(); ++i) {
38 DetailInput* input = &(*inputs)[i]; 38 DetailInput* input = &(*inputs)[i];
39 input->initial_value = common::GetHardcodedValueForType(input->type); 39 if (!i18ninput::Enabled())
40 input->initial_value = common::GetHardcodedValueForType(input->type);
40 if (input->initial_value.empty()) 41 if (input->initial_value.empty())
41 input->initial_value = GetInfo(AutofillType(input->type)); 42 input->initial_value = GetInfo(AutofillType(input->type));
42 } 43 }
43 } 44 }
44 45
45 base::string16 DataModelWrapper::GetInfoForDisplay(const AutofillType& type) 46 base::string16 DataModelWrapper::GetInfoForDisplay(const AutofillType& type)
46 const { 47 const {
47 return GetInfo(type); 48 return GetInfo(type);
48 } 49 }
49 50
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 339
339 FullWalletShippingWrapper::~FullWalletShippingWrapper() {} 340 FullWalletShippingWrapper::~FullWalletShippingWrapper() {}
340 341
341 base::string16 FullWalletShippingWrapper::GetInfo( 342 base::string16 FullWalletShippingWrapper::GetInfo(
342 const AutofillType& type) const { 343 const AutofillType& type) const {
343 return full_wallet_->shipping_address()->GetInfo( 344 return full_wallet_->shipping_address()->GetInfo(
344 type, g_browser_process->GetApplicationLocale()); 345 type, g_browser_process->GetApplicationLocale());
345 } 346 }
346 347
347 } // namespace autofill 348 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698