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

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

Issue 665163005: Add option to open PDFs in system viewer to OS X and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Harmonize the strings a bit better. Created 6 years, 2 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/app/generated_resources.grd ('k') | chrome/browser/download/download_prefs.h » ('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 429daac1019ade7887a8035be4a4ec7c8707ad9a..63c3ccee89560c6b1fcf9db4d3cef8491447c223 100644
--- a/chrome/browser/download/chrome_download_manager_delegate.cc
+++ b/chrome/browser/download/chrome_download_manager_delegate.cc
@@ -719,6 +719,12 @@ bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile(
}
#endif
+#if defined(OS_MACOSX) || defined(OS_LINUX)
Lei Zhang 2014/10/21 11:07:06 I'm not 100% sure what pieces of code Chrome for i
palmer 2014/10/21 20:31:49 OK, checking for defined(OS_MACOSX) && !defined(OS
+ if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) {
+ return !download_prefs_->ShouldOpenPdfInSystemReader();
+ }
+#endif
+
// On Android, always prefer opening with an external app. On ChromeOS, there
// are no external apps so just allow all opens to be handled by the "System."
#if !defined(OS_ANDROID) && !defined(OS_CHROMEOS) && defined(ENABLE_PLUGINS)
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/download/download_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698