| 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 COMPONENTS_DRIVE_DRIVE_API_UTIL_H_ | 5 #ifndef COMPONENTS_DRIVE_DRIVE_API_UTIL_H_ |
| 6 #define COMPONENTS_DRIVE_DRIVE_API_UTIL_H_ | 6 #define COMPONENTS_DRIVE_DRIVE_API_UTIL_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // Google Apps MIME types: | 34 // Google Apps MIME types: |
| 35 const char kGoogleDocumentMimeType[] = "application/vnd.google-apps.document"; | 35 const char kGoogleDocumentMimeType[] = "application/vnd.google-apps.document"; |
| 36 const char kGoogleDrawingMimeType[] = "application/vnd.google-apps.drawing"; | 36 const char kGoogleDrawingMimeType[] = "application/vnd.google-apps.drawing"; |
| 37 const char kGooglePresentationMimeType[] = | 37 const char kGooglePresentationMimeType[] = |
| 38 "application/vnd.google-apps.presentation"; | 38 "application/vnd.google-apps.presentation"; |
| 39 const char kGoogleSpreadsheetMimeType[] = | 39 const char kGoogleSpreadsheetMimeType[] = |
| 40 "application/vnd.google-apps.spreadsheet"; | 40 "application/vnd.google-apps.spreadsheet"; |
| 41 const char kGoogleTableMimeType[] = "application/vnd.google-apps.table"; | 41 const char kGoogleTableMimeType[] = "application/vnd.google-apps.table"; |
| 42 const char kGoogleFormMimeType[] = "application/vnd.google-apps.form"; | 42 const char kGoogleFormMimeType[] = "application/vnd.google-apps.form"; |
| 43 const char kGoogleMapMimeType[] = "application/vnd.google-apps.map"; | 43 const char kGoogleMapMimeType[] = "application/vnd.google-apps.map"; |
| 44 const char kGoogleSiteMimeType[] = "application/vnd.google-apps.site"; |
| 44 const char kDriveFolderMimeType[] = "application/vnd.google-apps.folder"; | 45 const char kDriveFolderMimeType[] = "application/vnd.google-apps.folder"; |
| 45 | 46 |
| 46 // Escapes ' to \' in the |str|. This is designed to use for string value of | 47 // Escapes ' to \' in the |str|. This is designed to use for string value of |
| 47 // search parameter on Drive API v2. | 48 // search parameter on Drive API v2. |
| 48 // See also: https://developers.google.com/drive/search-parameters | 49 // See also: https://developers.google.com/drive/search-parameters |
| 49 std::string EscapeQueryStringValue(const std::string& str); | 50 std::string EscapeQueryStringValue(const std::string& str); |
| 50 | 51 |
| 51 // Parses the query, and builds a search query for Drive API v2. | 52 // Parses the query, and builds a search query for Drive API v2. |
| 52 // This only supports: | 53 // This only supports: |
| 53 // Regular query (e.g. dog => fullText contains 'dog') | 54 // Regular query (e.g. dog => fullText contains 'dog') |
| (...skipping 22 matching lines...) Expand all Loading... |
| 76 bool IsKnownHostedDocumentMimeType(const std::string& mime_type); | 77 bool IsKnownHostedDocumentMimeType(const std::string& mime_type); |
| 77 | 78 |
| 78 // Returns true if the given file path has an extension corresponding to one of | 79 // Returns true if the given file path has an extension corresponding to one of |
| 79 // hosted document types. | 80 // hosted document types. |
| 80 bool HasHostedDocumentExtension(const base::FilePath& path); | 81 bool HasHostedDocumentExtension(const base::FilePath& path); |
| 81 | 82 |
| 82 } // namespace util | 83 } // namespace util |
| 83 } // namespace drive | 84 } // namespace drive |
| 84 | 85 |
| 85 #endif // COMPONENTS_DRIVE_DRIVE_API_UTIL_H_ | 86 #endif // COMPONENTS_DRIVE_DRIVE_API_UTIL_H_ |
| OLD | NEW |