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

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

Issue 328843002: Fill in country code correctly for wallet billing addresses. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: stupid test Created 6 years, 6 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
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 310 matching lines...) Expand 10 before | Expand all | Expand 10 after
321 FullWalletBillingWrapper::FullWalletBillingWrapper( 321 FullWalletBillingWrapper::FullWalletBillingWrapper(
322 wallet::FullWallet* full_wallet) 322 wallet::FullWallet* full_wallet)
323 : full_wallet_(full_wallet) { 323 : full_wallet_(full_wallet) {
324 DCHECK(full_wallet_); 324 DCHECK(full_wallet_);
325 } 325 }
326 326
327 FullWalletBillingWrapper::~FullWalletBillingWrapper() {} 327 FullWalletBillingWrapper::~FullWalletBillingWrapper() {}
328 328
329 base::string16 FullWalletBillingWrapper::GetInfo(const AutofillType& type) 329 base::string16 FullWalletBillingWrapper::GetInfo(const AutofillType& type)
330 const { 330 const {
331 return full_wallet_->GetInfo( 331 return full_wallet_->GetInfo(g_browser_process->GetApplicationLocale(), type);
332 g_browser_process->GetApplicationLocale(),
333 AutofillType(AutofillType::GetEquivalentBillingFieldType(
334 type.GetStorableType())));
335 } 332 }
336 333
337 bool FullWalletBillingWrapper::GetDisplayText( 334 bool FullWalletBillingWrapper::GetDisplayText(
338 base::string16* vertically_compact, 335 base::string16* vertically_compact,
339 base::string16* horizontally_compact) { 336 base::string16* horizontally_compact) {
340 // TODO(dbeam): handle other required actions? http://crbug.com/163508 337 // TODO(dbeam): handle other required actions? http://crbug.com/163508
341 if (full_wallet_->HasRequiredAction(wallet::UPDATE_EXPIRATION_DATE)) 338 if (full_wallet_->HasRequiredAction(wallet::UPDATE_EXPIRATION_DATE))
342 return false; 339 return false;
343 340
344 return DataModelWrapper::GetDisplayText(vertically_compact, 341 return DataModelWrapper::GetDisplayText(vertically_compact,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 } 393 }
397 394
398 return base::UTF8ToUTF16(address_->GetFieldValue(field)); 395 return base::UTF8ToUTF16(address_->GetFieldValue(field));
399 } 396 }
400 397
401 const std::string& I18nAddressDataWrapper::GetLanguageCode() const { 398 const std::string& I18nAddressDataWrapper::GetLanguageCode() const {
402 return address_->language_code; 399 return address_->language_code;
403 } 400 }
404 401
405 } // namespace autofill 402 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698