summaryrefslogtreecommitdiffstats
path: root/components
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-17 23:13:58 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-17 23:13:58 +0000
commitb75d4baceaa3fb0c3be1aad851e9cb594e1ce4f5 (patch)
tree72b910f29af445511e233ed76806de0e4b8bd51a /components
parentf90c870feb546e5e11481c8835329cf0efc8733d (diff)
downloadchromium_src-b75d4baceaa3fb0c3be1aad851e9cb594e1ce4f5.zip
chromium_src-b75d4baceaa3fb0c3be1aad851e9cb594e1ce4f5.tar.gz
chromium_src-b75d4baceaa3fb0c3be1aad851e9cb594e1ce4f5.tar.bz2
Move IsStringASCII/UTF8 to base namespace.
Use StringPiece for IsStringUTF8. TBR=sky Review URL: https://codereview.chromium.org/196793010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@257524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components')
-rw-r--r--components/autofill/content/browser/wallet/wallet_address.cc2
-rw-r--r--components/autofill/core/browser/address.cc4
-rw-r--r--components/autofill/core/browser/validation.cc2
-rw-r--r--components/storage_monitor/portable_device_watcher_win.cc2
-rw-r--r--components/url_matcher/url_matcher_unittest.cc8
5 files changed, 9 insertions, 9 deletions
diff --git a/components/autofill/content/browser/wallet/wallet_address.cc b/components/autofill/content/browser/wallet/wallet_address.cc
index ac92acb..67caac0 100644
--- a/components/autofill/content/browser/wallet/wallet_address.cc
+++ b/components/autofill/content/browser/wallet/wallet_address.cc
@@ -314,7 +314,7 @@ base::string16 Address::DisplayPhoneNumber() const {
base::string16 Address::GetInfo(const AutofillType& type,
const std::string& app_locale) const {
if (type.html_type() == HTML_TYPE_COUNTRY_CODE) {
- DCHECK(IsStringASCII(country_name_code()));
+ DCHECK(base::IsStringASCII(country_name_code()));
return base::ASCIIToUTF16(country_name_code());
}
diff --git a/components/autofill/core/browser/address.cc b/components/autofill/core/browser/address.cc
index de651479..79cdef9 100644
--- a/components/autofill/core/browser/address.cc
+++ b/components/autofill/core/browser/address.cc
@@ -107,7 +107,7 @@ void Address::SetRawInfo(ServerFieldType type, const base::string16& value) {
case ADDRESS_HOME_COUNTRY:
DCHECK(value.empty() ||
- (value.length() == 2u && IsStringASCII(value)));
+ (value.length() == 2u && base::IsStringASCII(value)));
country_code_ = base::UTF16ToASCII(value);
break;
@@ -144,7 +144,7 @@ bool Address::SetInfo(const AutofillType& type,
const base::string16& value,
const std::string& app_locale) {
if (type.html_type() == HTML_TYPE_COUNTRY_CODE) {
- if (!value.empty() && (value.size() != 2u || !IsStringASCII(value))) {
+ if (!value.empty() && (value.size() != 2u || !base::IsStringASCII(value))) {
country_code_ = std::string();
return false;
}
diff --git a/components/autofill/core/browser/validation.cc b/components/autofill/core/browser/validation.cc
index e1edf73..62509cb 100644
--- a/components/autofill/core/browser/validation.cc
+++ b/components/autofill/core/browser/validation.cc
@@ -182,7 +182,7 @@ bool IsSSN(const base::string16& text) {
// http://www.socialsecurity.gov/employer/stateweb.htm
// http://www.socialsecurity.gov/employer/ssnvhighgroup.htm
- if (number_string.length() != 9 || !IsStringASCII(number_string))
+ if (number_string.length() != 9 || !base::IsStringASCII(number_string))
return false;
int area;
diff --git a/components/storage_monitor/portable_device_watcher_win.cc b/components/storage_monitor/portable_device_watcher_win.cc
index 003553e..3d79ece 100644
--- a/components/storage_monitor/portable_device_watcher_win.cc
+++ b/components/storage_monitor/portable_device_watcher_win.cc
@@ -59,7 +59,7 @@ base::string16 GetPnpDeviceId(LPARAM data) {
if (!dev_interface)
return base::string16();
base::string16 device_id(dev_interface->dbcc_name);
- DCHECK(IsStringASCII(device_id));
+ DCHECK(base::IsStringASCII(device_id));
return StringToLowerASCII(device_id);
}
diff --git a/components/url_matcher/url_matcher_unittest.cc b/components/url_matcher/url_matcher_unittest.cc
index 748d310..1e0a2f1 100644
--- a/components/url_matcher/url_matcher_unittest.cc
+++ b/components/url_matcher/url_matcher_unittest.cc
@@ -159,10 +159,10 @@ TEST(URLMatcherConditionFactoryTest, GURLCharacterSet) {
// non ASCII-7 characters. We test this here, because a change to this
// guarantee breaks this implementation horribly.
GURL url("http://www.föö.com/föö?föö#föö");
- EXPECT_TRUE(IsStringASCII(url.host()));
- EXPECT_TRUE(IsStringASCII(url.path()));
- EXPECT_TRUE(IsStringASCII(url.query()));
- EXPECT_FALSE(IsStringASCII(url.ref()));
+ EXPECT_TRUE(base::IsStringASCII(url.host()));
+ EXPECT_TRUE(base::IsStringASCII(url.path()));
+ EXPECT_TRUE(base::IsStringASCII(url.query()));
+ EXPECT_FALSE(base::IsStringASCII(url.ref()));
}
TEST(URLMatcherConditionFactoryTest, Criteria) {