OLD | NEW |
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 |
OLD | NEW |