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

Side by Side Diff: components/autofill/content/browser/wallet/wallet_address.cc

Issue 196793010: Move IsStringASCII/UTF8 to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | « chromeos/network/shill_property_util.cc ('k') | components/autofill/core/browser/address.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/autofill/content/browser/wallet/wallet_address.h" 5 #include "components/autofill/content/browser/wallet/wallet_address.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/string_split.h" 8 #include "base/strings/string_split.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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 // impose our own. phone_number() always includes a country code, so using 307 // impose our own. phone_number() always includes a country code, so using
308 // PhoneObject to format it would result in an internationalized format. Since 308 // PhoneObject to format it would result in an internationalized format. Since
309 // Wallet only supports the US right now, stick to national formatting. 309 // Wallet only supports the US right now, stick to national formatting.
310 return i18n::PhoneObject(phone_number(), country_name_code()). 310 return i18n::PhoneObject(phone_number(), country_name_code()).
311 GetNationallyFormattedNumber(); 311 GetNationallyFormattedNumber();
312 } 312 }
313 313
314 base::string16 Address::GetInfo(const AutofillType& type, 314 base::string16 Address::GetInfo(const AutofillType& type,
315 const std::string& app_locale) const { 315 const std::string& app_locale) const {
316 if (type.html_type() == HTML_TYPE_COUNTRY_CODE) { 316 if (type.html_type() == HTML_TYPE_COUNTRY_CODE) {
317 DCHECK(IsStringASCII(country_name_code())); 317 DCHECK(base::IsStringASCII(country_name_code()));
318 return base::ASCIIToUTF16(country_name_code()); 318 return base::ASCIIToUTF16(country_name_code());
319 } 319 }
320 320
321 switch (type.GetStorableType()) { 321 switch (type.GetStorableType()) {
322 case NAME_FULL: 322 case NAME_FULL:
323 return recipient_name(); 323 return recipient_name();
324 324
325 case ADDRESS_HOME_STREET_ADDRESS: 325 case ADDRESS_HOME_STREET_ADDRESS:
326 return JoinString(street_address_, base::ASCIIToUTF16("\n")); 326 return JoinString(street_address_, base::ASCIIToUTF16("\n"));
327 327
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 bool Address::operator==(const Address& other) const { 392 bool Address::operator==(const Address& other) const {
393 return object_id_ == other.object_id_ && EqualsIgnoreID(other); 393 return object_id_ == other.object_id_ && EqualsIgnoreID(other);
394 } 394 }
395 395
396 bool Address::operator!=(const Address& other) const { 396 bool Address::operator!=(const Address& other) const {
397 return !(*this == other); 397 return !(*this == other);
398 } 398 }
399 399
400 } // namespace wallet 400 } // namespace wallet
401 } // namespace autofill 401 } // namespace autofill
OLDNEW
« no previous file with comments | « chromeos/network/shill_property_util.cc ('k') | components/autofill/core/browser/address.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698