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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/google_apis/drive_api_util.h" 5 #include "chrome/browser/google_apis/drive_api_util.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/string_util.h"
8 #include "chrome/browser/google_apis/drive_switches.h" 9 #include "chrome/browser/google_apis/drive_switches.h"
9 10
10 namespace google_apis { 11 namespace google_apis {
11 namespace util { 12 namespace util {
12 13
13 bool IsDriveV2ApiEnabled() { 14 bool IsDriveV2ApiEnabled() {
14 return CommandLine::ForCurrentProcess()->HasSwitch( 15 return CommandLine::ForCurrentProcess()->HasSwitch(
15 switches::kEnableDriveV2Api); 16 switches::kEnableDriveV2Api);
16 } 17 }
17 18
18 } // namespace util 19 } // namespace util
20
21 namespace drive {
22 namespace util {
23
24 std::string EscapeQueryStringValue(const std::string& str) {
25 std::string result;
26 ReplaceChars(str, "'", "\\'", &result);
27 return result;
28 }
29
30 } // namespace util
31 } // namespace drive
19 } // namespace google_apis 32 } // namespace google_apis
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698