summaryrefslogtreecommitdiffstats
path: root/extensions
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 /extensions
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 'extensions')
-rw-r--r--extensions/common/extension.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/extensions/common/extension.cc b/extensions/common/extension.cc
index df6ea04..d6158c4 100644
--- a/extensions/common/extension.cc
+++ b/extensions/common/extension.cc
@@ -224,7 +224,7 @@ bool Extension::ParsePEMKeyBytes(const std::string& input,
std::string working = input;
if (StartsWithASCII(working, kKeyBeginHeaderMarker, true)) {
- working = CollapseWhitespaceASCII(working, true);
+ working = base::CollapseWhitespaceASCII(working, true);
size_t header_pos = working.find(kKeyInfoEndMarker,
sizeof(kKeyBeginHeaderMarker) - 1);
if (header_pos == std::string::npos)