summaryrefslogtreecommitdiffstats
path: root/cloud_print
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-11 23:16:24 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-11 23:16:24 +0000
commit1e1229a168974388ff8cda5e0e066b5978ec227f (patch)
treec9ea94374590415da82c09625fcf7dbdbf5826a6 /cloud_print
parent216f48465ec76e97c83f375bc3e0bed1c0344caa (diff)
downloadchromium_src-1e1229a168974388ff8cda5e0e066b5978ec227f.zip
chromium_src-1e1229a168974388ff8cda5e0e066b5978ec227f.tar.gz
chromium_src-1e1229a168974388ff8cda5e0e066b5978ec227f.tar.bz2
Remove ContainsOnlyWhitespace from string_util and CollapseWhitespace into to the base namespace
This function is only used in a few places and can trivially be implemented by passing the whitespace constant to the existing ContainsOnlyChars function. This changes the ContainsOnlyChars function signature to take a StringPiece to avoid a copy from a literal to a standard string in the above-mentioned use-base. Re-implement ContainsOnlyChars to use the find_first_not_of function on StringPiece. BUG= R=viettrungluu@chromium.org Review URL: https://codereview.chromium.org/183683024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@256354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cloud_print')
-rw-r--r--cloud_print/service/service_state_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloud_print/service/service_state_unittest.cc b/cloud_print/service/service_state_unittest.cc
index 50155e8..b0f0029 100644
--- a/cloud_print/service/service_state_unittest.cc
+++ b/cloud_print/service/service_state_unittest.cc
@@ -20,7 +20,7 @@ TEST(ServiceStateTest, Empty) {
TEST(ServiceStateTest, ToString) {
ServiceState state;
EXPECT_STREQ("{\"cloud_print\": {\"enabled\": true}}",
- CollapseWhitespaceASCII(state.ToString(), true).c_str());
+ base::CollapseWhitespaceASCII(state.ToString(), true).c_str());
state.set_email("test@gmail.com");
state.set_proxy_id("proxy");
state.set_robot_email("robot@gmail.com");
@@ -32,7 +32,7 @@ TEST(ServiceStateTest, ToString) {
"\"test@gmail.com\",\"enabled\": true,\"proxy_id\": \"proxy\","
"\"robot_email\": \"robot@gmail.com\",\"robot_refresh_token\": "
"\"abc\",\"xmpp_auth_token\": \"token2\"}}",
- CollapseWhitespaceASCII(state.ToString(), true).c_str());
+ base::CollapseWhitespaceASCII(state.ToString(), true).c_str());
}
TEST(ServiceStateTest, FromString) {