Index: chrome/browser/drive/drive_api_util.h |
diff --git a/chrome/browser/drive/drive_api_util.h b/chrome/browser/drive/drive_api_util.h |
index a57432011d678e98eb5b9bf132c26559872c1da4..e038b2d19f9665341365f91b8e80f2bdc93fdd29 100644 |
--- a/chrome/browser/drive/drive_api_util.h |
+++ b/chrome/browser/drive/drive_api_util.h |
@@ -10,7 +10,6 @@ |
#include "base/memory/scoped_ptr.h" |
#include "chrome/browser/drive/drive_service_interface.h" |
#include "google_apis/drive/drive_common_callbacks.h" |
-#include "google_apis/drive/drive_entry_kinds.h" |
#include "google_apis/drive/gdata_errorcode.h" |
class GURL; |
@@ -88,14 +87,6 @@ void ParseShareUrlAndRun(const google_apis::GetShareUrlCallback& callback, |
google_apis::GDataErrorCode error, |
scoped_ptr<base::Value> value); |
-// Converts ResourceEntry to FileResource. |
-scoped_ptr<google_apis::FileResource> |
-ConvertResourceEntryToFileResource(const google_apis::ResourceEntry& entry); |
- |
-// Returns the GData WAPI's Kind of the FileResource. |
-google_apis::DriveEntryKind GetKind( |
- const google_apis::FileResource& file_resource); |
- |
// Converts FileResource to ResourceEntry. |
scoped_ptr<google_apis::ResourceEntry> |
ConvertFileResourceToResourceEntry( |
@@ -122,6 +113,24 @@ std::string GetMd5Digest(const base::FilePath& file_path); |
// https://developers.google.com/google-apps/documents-list/ |
extern const char kWapiRootDirectoryResourceId[]; |
+// Returns preferred file extension for hosted documents which have given mime |
+// type. If the given mime type is not known as one for hosted documents, |
+// returns empty string. |
+std::string GetHostedDocumentExtension(const std::string& mime_type); |
+ |
+// Returns mime type for hosted documents which have given extension in form |
+// ".xxx". If the given extension is not known as one for hosted documents, |
+// returns empty string. |
+std::string GetHostedDocumentMimeType(const std::string& extension); |
+ |
+// Returns true if the given mime type is corresponding to one of hosted |
+// documents. |
+bool IsHostedDocument(const std::string& mime_type); |
+ |
+// Returns true if the given extension is corresponding to one of hosted |
+// documents. |
+bool IsHostedDocumentByExtension(const std::string& extension); |
+ |
} // namespace util |
} // namespace drive |