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

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

Issue 390083003: Use street address collapser instead of line separator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 6 years, 5 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // I18nAddressDataWrapper 374 // I18nAddressDataWrapper
375 375
376 I18nAddressDataWrapper::I18nAddressDataWrapper( 376 I18nAddressDataWrapper::I18nAddressDataWrapper(
377 const ::i18n::addressinput::AddressData* address) 377 const ::i18n::addressinput::AddressData* address)
378 : address_(address) {} 378 : address_(address) {}
379 379
380 I18nAddressDataWrapper::~I18nAddressDataWrapper() {} 380 I18nAddressDataWrapper::~I18nAddressDataWrapper() {}
381 381
382 base::string16 I18nAddressDataWrapper::GetInfo(const AutofillType& type) const { 382 base::string16 I18nAddressDataWrapper::GetInfo(const AutofillType& type) const {
383 ::i18n::addressinput::AddressField field; 383 ::i18n::addressinput::AddressField field;
384 if (!i18ninput::FieldForType(type.GetStorableType(), &field)) 384 if (!i18n::FieldForType(type.GetStorableType(), &field))
385 return base::string16(); 385 return base::string16();
386 386
387 if (field == ::i18n::addressinput::STREET_ADDRESS) 387 if (field == ::i18n::addressinput::STREET_ADDRESS)
388 return base::string16(); 388 return base::string16();
389 389
390 if (field == ::i18n::addressinput::COUNTRY) { 390 if (field == ::i18n::addressinput::COUNTRY) {
391 return AutofillCountry(address_->region_code, 391 return AutofillCountry(address_->region_code,
392 g_browser_process->GetApplicationLocale()).name(); 392 g_browser_process->GetApplicationLocale()).name();
393 } 393 }
394 394
395 return base::UTF8ToUTF16(address_->GetFieldValue(field)); 395 return base::UTF8ToUTF16(address_->GetFieldValue(field));
396 } 396 }
397 397
398 const std::string& I18nAddressDataWrapper::GetLanguageCode() const { 398 const std::string& I18nAddressDataWrapper::GetLanguageCode() const {
399 return address_->language_code; 399 return address_->language_code;
400 } 400 }
401 401
402 } // namespace autofill 402 } // namespace autofill
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_i18n_input.cc ('k') | components/autofill/core/browser/address_i18n.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698