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

Unified Diff: chrome/browser/policy/cloud/resource_cache.cc

Issue 102843002: Move RemoveChars, ReplaceChars, TrimString, and TruncateUTF8ToByteSize to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/cloud/resource_cache.cc
diff --git a/chrome/browser/policy/cloud/resource_cache.cc b/chrome/browser/policy/cloud/resource_cache.cc
index 79b553141afbf0e73276e2836936c05a71222e8a..4a9932a8ca04087bf5d061e28f9cc17382b6ee60 100644
--- a/chrome/browser/policy/cloud/resource_cache.cc
+++ b/chrome/browser/policy/cloud/resource_cache.cc
@@ -23,8 +23,8 @@ bool Base64Encode(const std::string& value, std::string* encoded) {
DCHECK(!value.empty());
if (value.empty() || !base::Base64Encode(value, encoded))
return false;
- ReplaceChars(*encoded, "+", "-", encoded);
- ReplaceChars(*encoded, "/", "_", encoded);
+ base::ReplaceChars(*encoded, "+", "-", encoded);
+ base::ReplaceChars(*encoded, "/", "_", encoded);
return true;
}
@@ -49,8 +49,8 @@ bool Base64Encode(const std::set<std::string>& input,
// emtpy.
bool Base64Decode(const std::string& encoded, std::string* value) {
std::string buffer;
- ReplaceChars(encoded, "-", "+", &buffer);
- ReplaceChars(buffer, "_", "/", &buffer);
+ base::ReplaceChars(encoded, "-", "+", &buffer);
+ base::ReplaceChars(buffer, "_", "/", &buffer);
return base::Base64Decode(buffer, value) && !value->empty();
}

Powered by Google App Engine
This is Rietveld 408576698