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

Unified Diff: chrome/browser/download/download_manager.cc

Issue 159483: Revert 21800 - Merge 21612 Implement mimetype sniffing for extensions.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 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/download/download_manager.h ('k') | chrome/browser/download/save_package.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_manager.cc
===================================================================
--- chrome/browser/download/download_manager.cc (revision 21811)
+++ chrome/browser/download/download_manager.cc (working copy)
@@ -117,8 +117,6 @@
: id_(-1),
full_path_(info.path),
url_(info.url),
- referrer_url_(info.referrer_url),
- mime_type_(info.mime_type),
total_bytes_(info.total_bytes),
received_bytes_(info.received_bytes),
start_tick_(base::TimeTicks()),
@@ -143,7 +141,6 @@
const FilePath& path,
int path_uniquifier,
const GURL& url,
- const std::string& mime_type,
const FilePath& original_name,
const base::Time start_time,
int64 download_size,
@@ -154,7 +151,6 @@
full_path_(path),
path_uniquifier_(path_uniquifier),
url_(url),
- mime_type_(mime_type),
total_bytes_(download_size),
received_bytes_(0),
start_tick_(base::TimeTicks::Now()),
@@ -678,7 +674,6 @@
info->path,
info->path_uniquifier,
info->url,
- info->mime_type,
info->original_name,
info->start_time,
info->total_bytes,
@@ -843,7 +838,7 @@
extension = extension.substr(1);
// Handle chrome extensions explicitly and skip the shell execute.
- if (download->mime_type() == Extension::kMimeType) {
+ if (Extension::IsExtension(download->full_path())) {
OpenChromeExtension(download->full_path(), download->url());
download->set_auto_opened(true);
} else if (download->open_when_complete() ||
@@ -1212,7 +1207,7 @@
gfx::NativeView parent_window) {
// Open Chrome extensions with ExtensionsService. For everything else do shell
// execute.
- if (download->mime_type() == Extension::kMimeType) {
+ if (Extension::IsExtension(download->full_path())) {
OpenChromeExtension(download->full_path(), download->url());
} else {
OpenDownloadInShell(download, parent_window);
Property changes on: chrome\browser\download\download_manager.cc
___________________________________________________________________
Modified: svn:mergeinfo
Reverse-merged /trunk/src/chrome/browser/download/download_manager.cc:r21321,21612
Reverse-merged /branches/chrome_webkit_merge_branch/chrome/browser/download/download_manager.cc:r69-2775
« no previous file with comments | « chrome/browser/download/download_manager.h ('k') | chrome/browser/download/save_package.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698