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

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

Issue 14884015: drive: Remove DriveFileType (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 7 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_proxy.cc
diff --git a/chrome/browser/chromeos/drive/file_system_proxy.cc b/chrome/browser/chromeos/drive/file_system_proxy.cc
index 1957f75afb2a13fe674e1cd96c86473ed602aad5..15149964b5217c7fb838bdcefd2422cfca1fd672 100644
--- a/chrome/browser/chromeos/drive/file_system_proxy.cc
+++ b/chrome/browser/chromeos/drive/file_system_proxy.cc
@@ -57,8 +57,7 @@ void OnGetFileByPathForOpen(
base::ProcessHandle peer_handle,
FileError file_error,
const base::FilePath& local_path,
- const std::string& unused_mime_type,
- DriveFileType file_type) {
+ scoped_ptr<ResourceEntry> entry) {
base::PlatformFileError error =
FileErrorToPlatformError(file_error);
if (error != base::PLATFORM_FILE_OK) {
@@ -89,8 +88,7 @@ void CallSnapshotFileCallback(
const base::PlatformFileInfo& file_info,
FileError file_error,
const base::FilePath& local_path,
- const std::string& unused_mime_type,
- DriveFileType file_type) {
+ scoped_ptr<ResourceEntry> entry) {
scoped_refptr<ShareableFileReference> file_ref;
base::PlatformFileError error =
FileErrorToPlatformError(file_error);
@@ -98,7 +96,8 @@ void CallSnapshotFileCallback(
// If the file is a hosted document, a temporary JSON file is created to
// represent the document. The JSON file is not cached and its lifetime
// is managed by ShareableFileReference.
- if (error == base::PLATFORM_FILE_OK && file_type == HOSTED_DOCUMENT) {
+ if (error == base::PLATFORM_FILE_OK &&
+ entry && entry->file_specific_info().is_hosted_document()) {
file_ref = ShareableFileReference::GetOrCreate(
local_path, ShareableFileReference::DELETE_ON_FINAL_RELEASE,
BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE));
« no previous file with comments | « chrome/browser/chromeos/drive/file_system_interface.h ('k') | chrome/browser/chromeos/drive/file_system_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698