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 <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
14 #include "base/utf_string_conversions.h" | 14 #include "base/strings/utf_string_conversions.h" |
15 #include "chrome/browser/google_apis/drive_switches.h" | 15 #include "chrome/browser/google_apis/drive_switches.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
17 #include "net/base/escape.h" | 17 #include "net/base/escape.h" |
18 #include "third_party/re2/re2/re2.h" | 18 #include "third_party/re2/re2/re2.h" |
19 | 19 |
20 namespace google_apis { | 20 namespace google_apis { |
21 namespace util { | 21 namespace util { |
22 | 22 |
23 bool IsDriveV2ApiEnabled() { | 23 bool IsDriveV2ApiEnabled() { |
24 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 24 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 std::string stripped_resource_id; | 129 std::string stripped_resource_id; |
130 if (RE2::FullMatch(resource_id, "^[a-z-]+(?::|%3A)([\\w-]+)$", | 130 if (RE2::FullMatch(resource_id, "^[a-z-]+(?::|%3A)([\\w-]+)$", |
131 &stripped_resource_id)) | 131 &stripped_resource_id)) |
132 return stripped_resource_id; | 132 return stripped_resource_id; |
133 return resource_id; | 133 return resource_id; |
134 } | 134 } |
135 | 135 |
136 } // namespace util | 136 } // namespace util |
137 } // namespace drive | 137 } // namespace drive |
138 } // namespace google_apis | 138 } // namespace google_apis |
OLD | NEW |