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

Unified Diff: chrome/browser/extensions/platform_app_launcher.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/extensions/platform_app_launcher.cc
diff --git a/chrome/browser/extensions/platform_app_launcher.cc b/chrome/browser/extensions/platform_app_launcher.cc
index f0cf0c6c630b79518e28f401d82194171f0d8db6..d7e283982dc9df9113bacf31083a72a88a45b428 100644
--- a/chrome/browser/extensions/platform_app_launcher.cc
+++ b/chrome/browser/extensions/platform_app_launcher.cc
@@ -181,15 +181,17 @@ class PlatformAppPathLauncher
void OnGotDriveFile(drive::FileError error,
const base::FilePath& file_path,
- const std::string& mime_type,
- drive::DriveFileType file_type) {
+ scoped_ptr<drive::ResourceEntry> entry) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- if (error != drive::FILE_ERROR_OK || file_type != drive::REGULAR_FILE) {
+ if (error != drive::FILE_ERROR_OK ||
+ !entry || entry->file_specific_info().is_hosted_document()) {
LaunchWithNoLaunchData();
return;
}
+ const std::string& mime_type =
+ entry->file_specific_info().content_mime_type();
LaunchWithMimeType(mime_type.empty() ? kFallbackMimeType : mime_type);
}
#endif // defined(OS_CHROMEOS)
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager/file_manager_util.cc ('k') | chrome/browser/ui/webui/screenshot_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698