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

Unified Diff: chrome/browser/google_apis/drive_api_util.cc

Issue 14013005: Move EscapeQueryStringValue to drive_api_util. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/google_apis/drive_api_util.cc
diff --git a/chrome/browser/google_apis/drive_api_util.cc b/chrome/browser/google_apis/drive_api_util.cc
index c8f03d4f242b145619c93c845f425816f0f63ed1..10597c3c7e5fe870bcee90b711ba50f4555fc93f 100644
--- a/chrome/browser/google_apis/drive_api_util.cc
+++ b/chrome/browser/google_apis/drive_api_util.cc
@@ -5,6 +5,7 @@
#include "chrome/browser/google_apis/drive_api_util.h"
#include "base/command_line.h"
+#include "base/string_util.h"
#include "chrome/browser/google_apis/drive_switches.h"
namespace google_apis {
@@ -16,4 +17,16 @@ bool IsDriveV2ApiEnabled() {
}
} // namespace util
+
+namespace drive {
+namespace util {
+
+std::string EscapeQueryStringValue(const std::string& str) {
+ std::string result;
+ ReplaceChars(str, "'", "\\'", &result);
+ return result;
+}
+
+} // namespace util
+} // namespace drive
} // namespace google_apis

Powered by Google App Engine
This is Rietveld 408576698