Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Unified Diff: chrome/browser/drive/drive_api_util.h

Issue 384543004: Get rid of DriveEntryKind. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed some temporary variables and IsHostedDocumentByFileExtension(). Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/chromeos/file_manager/file_tasks.cc ('k') | chrome/browser/drive/drive_api_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/chromeos/file_manager/file_tasks.cc ('k') | chrome/browser/drive/drive_api_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698