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

Unified Diff: chrome/browser/chromeos/drive/file_system_util.cc

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
Index: chrome/browser/chromeos/drive/file_system_util.cc
diff --git a/chrome/browser/chromeos/drive/file_system_util.cc b/chrome/browser/chromeos/drive/file_system_util.cc
index d0b5be2fe25564a409cc770eed1f2221e9f9d4ae..599011386addcb7637822420bbfe3d73837b29b3 100644
--- a/chrome/browser/chromeos/drive/file_system_util.cc
+++ b/chrome/browser/chromeos/drive/file_system_util.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/chromeos/drive/write_on_cache_file.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/profiles/profile_util.h"
+#include "chrome/browser/drive/drive_api_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_constants.h"
@@ -37,7 +38,6 @@
#include "chrome/common/url_constants.h"
#include "chromeos/chromeos_constants.h"
#include "content/public/browser/browser_thread.h"
-#include "google_apis/drive/gdata_wapi_parser.h"
#include "net/base/escape.h"
#include "webkit/browser/fileapi/file_system_url.h"
@@ -345,9 +345,8 @@ bool CreateGDocFile(const base::FilePath& file_path,
}
bool HasGDocFileExtension(const base::FilePath& file_path) {
- return google_apis::ResourceEntry::ClassifyEntryKindByFileExtension(
- file_path) &
- google_apis::ResourceEntry::KIND_OF_HOSTED_DOCUMENT;
+ std::string extension = base::FilePath(file_path.Extension()).AsUTF8Unsafe();
+ return IsHostedDocumentByExtension(extension);
}
GURL ReadUrlFromGDocFile(const base::FilePath& file_path) {

Powered by Google App Engine
This is Rietveld 408576698