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

Unified Diff: google_apis/drive/gdata_wapi_parser.h

Issue 384543004: Get rid of DriveEntryKind. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
Index: google_apis/drive/gdata_wapi_parser.h
diff --git a/google_apis/drive/gdata_wapi_parser.h b/google_apis/drive/gdata_wapi_parser.h
index 1081dbcf9cf7b58e4578aec60d2f27c9199f83c5..baea52c90980034bb5486ecfd6b3a5017c89251e 100644
--- a/google_apis/drive/gdata_wapi_parser.h
+++ b/google_apis/drive/gdata_wapi_parser.h
@@ -418,10 +418,6 @@ class ResourceEntry : public CommonMetadata {
// unknown entry kind.
std::string GetEntryKindText() const;
- // Returns preferred file extension for hosted documents. If entry is not
- // a hosted document, this call returns an empty string.
- static std::string GetHostedDocumentExtension(DriveEntryKind kind);
-
// True if resource entry is remotely hosted.
bool is_hosted_document() const {
return (ClassifyEntryKind(kind_) & KIND_OF_HOSTED_DOCUMENT) > 0;
@@ -442,35 +438,6 @@ class ResourceEntry : public CommonMetadata {
bool is_file() const {
return (ClassifyEntryKind(kind_) & KIND_OF_FILE) > 0;
}
- // True if resource entry can't be mapped to the file system.
- bool is_special() const {
- return !is_file() && !is_folder() && !is_hosted_document();
- }
-
- // The following constructs are exposed for unit tests.
-
- // Classes of EntryKind. Used for ClassifyEntryKind().
- enum EntryKindClass {
- KIND_OF_NONE = 0,
- KIND_OF_HOSTED_DOCUMENT = 1,
- KIND_OF_GOOGLE_DOCUMENT = 1 << 1,
- KIND_OF_EXTERNAL_DOCUMENT = 1 << 2,
- KIND_OF_FOLDER = 1 << 3,
- KIND_OF_FILE = 1 << 4,
- };
-
- // Returns the kind enum corresponding to the extension in form ".xxx".
- static DriveEntryKind GetEntryKindFromExtension(const std::string& extension);
-
- // Classifies the EntryKind. The returned value is a bitmask of
- // EntryKindClass. For example, DOCUMENT is classified as
- // KIND_OF_HOSTED_DOCUMENT and KIND_OF_GOOGLE_DOCUMENT, hence the returned
- // value is KIND_OF_HOSTED_DOCUMENT | KIND_OF_GOOGLE_DOCUMENT.
- static int ClassifyEntryKind(DriveEntryKind kind);
-
- // Classifies the EntryKind by the file extension of specific path. The
- // returned value is a bitmask of EntryKindClass. See also ClassifyEntryKind.
- static int ClassifyEntryKindByFileExtension(const base::FilePath& file);
void set_resource_id(const std::string& resource_id) {
resource_id_ = resource_id;

Powered by Google App Engine
This is Rietveld 408576698