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 #ifndef CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 5 #ifndef CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
6 #define CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 6 #define CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 class FileList; | 31 class FileList; |
32 class FileResource; | 32 class FileResource; |
33 class InstalledApp; | 33 class InstalledApp; |
34 class ResourceEntry; | 34 class ResourceEntry; |
35 class ResourceList; | 35 class ResourceList; |
36 } // namespace google_apis | 36 } // namespace google_apis |
37 | 37 |
38 namespace drive { | 38 namespace drive { |
39 namespace util { | 39 namespace util { |
40 | 40 |
41 // Returns true if Drive v2 API is enabled via commandline switch. | |
42 bool IsDriveV2ApiEnabled(); | |
43 | |
44 // Escapes ' to \' in the |str|. This is designed to use for string value of | 41 // Escapes ' to \' in the |str|. This is designed to use for string value of |
45 // search parameter on Drive API v2. | 42 // search parameter on Drive API v2. |
46 // See also: https://developers.google.com/drive/search-parameters | 43 // See also: https://developers.google.com/drive/search-parameters |
47 std::string EscapeQueryStringValue(const std::string& str); | 44 std::string EscapeQueryStringValue(const std::string& str); |
48 | 45 |
49 // Parses the query, and builds a search query for Drive API v2. | 46 // Parses the query, and builds a search query for Drive API v2. |
50 // This only supports: | 47 // This only supports: |
51 // Regular query (e.g. dog => fullText contains 'dog') | 48 // Regular query (e.g. dog => fullText contains 'dog') |
52 // Conjunctions | 49 // Conjunctions |
53 // (e.g. dog cat => fullText contains 'dog' and fullText contains 'cat') | 50 // (e.g. dog cat => fullText contains 'dog' and fullText contains 'cat') |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 std::string GetMd5Digest(const base::FilePath& file_path); | 124 std::string GetMd5Digest(const base::FilePath& file_path); |
128 | 125 |
129 // The resource ID for the root directory for WAPI is defined in the spec: | 126 // The resource ID for the root directory for WAPI is defined in the spec: |
130 // https://developers.google.com/google-apps/documents-list/ | 127 // https://developers.google.com/google-apps/documents-list/ |
131 extern const char kWapiRootDirectoryResourceId[]; | 128 extern const char kWapiRootDirectoryResourceId[]; |
132 | 129 |
133 } // namespace util | 130 } // namespace util |
134 } // namespace drive | 131 } // namespace drive |
135 | 132 |
136 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 133 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
OLD | NEW |