| 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 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 // Google Apps MIME types: | 33 // Google Apps MIME types: |
| 34 const char kGoogleDocumentMimeType[] = "application/vnd.google-apps.document"; | 34 const char kGoogleDocumentMimeType[] = "application/vnd.google-apps.document"; |
| 35 const char kGoogleDrawingMimeType[] = "application/vnd.google-apps.drawing"; | 35 const char kGoogleDrawingMimeType[] = "application/vnd.google-apps.drawing"; |
| 36 const char kGooglePresentationMimeType[] = | 36 const char kGooglePresentationMimeType[] = |
| 37 "application/vnd.google-apps.presentation"; | 37 "application/vnd.google-apps.presentation"; |
| 38 const char kGoogleSpreadsheetMimeType[] = | 38 const char kGoogleSpreadsheetMimeType[] = |
| 39 "application/vnd.google-apps.spreadsheet"; | 39 "application/vnd.google-apps.spreadsheet"; |
| 40 const char kGoogleTableMimeType[] = "application/vnd.google-apps.table"; | 40 const char kGoogleTableMimeType[] = "application/vnd.google-apps.table"; |
| 41 const char kGoogleFormMimeType[] = "application/vnd.google-apps.form"; | 41 const char kGoogleFormMimeType[] = "application/vnd.google-apps.form"; |
| 42 const char kGoogleMapMimeType[] = "application/vnd.google-apps.map"; |
| 42 const char kDriveFolderMimeType[] = "application/vnd.google-apps.folder"; | 43 const char kDriveFolderMimeType[] = "application/vnd.google-apps.folder"; |
| 43 | 44 |
| 44 // Escapes ' to \' in the |str|. This is designed to use for string value of | 45 // Escapes ' to \' in the |str|. This is designed to use for string value of |
| 45 // search parameter on Drive API v2. | 46 // search parameter on Drive API v2. |
| 46 // See also: https://developers.google.com/drive/search-parameters | 47 // See also: https://developers.google.com/drive/search-parameters |
| 47 std::string EscapeQueryStringValue(const std::string& str); | 48 std::string EscapeQueryStringValue(const std::string& str); |
| 48 | 49 |
| 49 // Parses the query, and builds a search query for Drive API v2. | 50 // Parses the query, and builds a search query for Drive API v2. |
| 50 // This only supports: | 51 // This only supports: |
| 51 // Regular query (e.g. dog => fullText contains 'dog') | 52 // Regular query (e.g. dog => fullText contains 'dog') |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 bool IsKnownHostedDocumentMimeType(const std::string& mime_type); | 95 bool IsKnownHostedDocumentMimeType(const std::string& mime_type); |
| 95 | 96 |
| 96 // Returns true if the given file path has an extension corresponding to one of | 97 // Returns true if the given file path has an extension corresponding to one of |
| 97 // hosted document types. | 98 // hosted document types. |
| 98 bool HasHostedDocumentExtension(const base::FilePath& path); | 99 bool HasHostedDocumentExtension(const base::FilePath& path); |
| 99 | 100 |
| 100 } // namespace util | 101 } // namespace util |
| 101 } // namespace drive | 102 } // namespace drive |
| 102 | 103 |
| 103 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 104 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
| OLD | NEW |