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

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

Issue 10079012: Change resource handling policy to allow feed types to download so they can be handled by web inten… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head Created 8 years, 8 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 | « no previous file | content/browser/renderer_host/buffered_resource_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/chrome_download_manager_delegate.cc
diff --git a/chrome/browser/download/chrome_download_manager_delegate.cc b/chrome/browser/download/chrome_download_manager_delegate.cc
index 65e42702d0cf8fedc400cb577aef16e11f7b7767..b0323ddd25a3921a6fffe22d6d6d09306f2fbe66 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -260,6 +260,26 @@ bool ChromeDownloadManagerDelegate::ShouldOpenDownload(DownloadItem* item) {
bool ChromeDownloadManagerDelegate::ShouldOpenWithWebIntents(
const DownloadItem* item) {
+ std::string mime_type = item->GetMimeType();
+ if (mime_type == "application/rss+xml" ||
+ mime_type == "application/atom+xml") {
+ return true;
+ }
+
+#if defined(OS_CHROMEOS)
+ if (mime_type == "application/msword" ||
+ mime_type == "application/vnd.ms-powerpoint" ||
+ mime_type == "application/vnd.ms-excel" ||
+ mime_type == "application/vnd.openxmlformats-officedocument."
+ "wordprocessingml.document" ||
+ mime_type == "application/vnd.openxmlformats-officedocument."
+ "presentationml.presentation" ||
+ mime_type == "application/vnd.openxmlformats-officedocument."
+ "spreadsheetml.sheet") {
+ return true;
+ }
+#endif // defined(OS_CHROMEOS)
+
return false;
}
« no previous file with comments | « no previous file | content/browser/renderer_host/buffered_resource_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698