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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 120 |
121 // Returns mime type for hosted documents which have given extension in form | 121 // Returns mime type for hosted documents which have given extension in form |
122 // ".xxx". If the given extension is not known as one for hosted documents, | 122 // ".xxx". If the given extension is not known as one for hosted documents, |
123 // returns empty string. | 123 // returns empty string. |
124 std::string GetHostedDocumentMimeType(const std::string& extension); | 124 std::string GetHostedDocumentMimeType(const std::string& extension); |
125 | 125 |
126 // Returns true if the given mime type is corresponding to one of hosted | 126 // Returns true if the given mime type is corresponding to one of hosted |
127 // documents. | 127 // documents. |
128 bool IsHostedDocument(const std::string& mime_type); | 128 bool IsHostedDocument(const std::string& mime_type); |
129 | 129 |
130 // Returns true if the given extension is corresponding to one of hosted | 130 // Returns true if the given file path has an extension corresponding to one of |
131 // documents. | 131 // hosted document types. |
132 bool IsHostedDocumentByExtension(const std::string& extension); | 132 bool HasHostedDocumentExtension(const base::FilePath& path); |
133 | 133 |
134 } // namespace util | 134 } // namespace util |
135 } // namespace drive | 135 } // namespace drive |
136 | 136 |
137 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ | 137 #endif // CHROME_BROWSER_DRIVE_DRIVE_API_UTIL_H_ |
OLD | NEW |