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

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

Issue 2669773002: Revert changes to DownloadPrefs regarding PDF auto open. (Closed)
Patch Set: Created 3 years, 11 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_prefs.h ('k') | chrome/browser/download/download_prefs_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_prefs.cc
diff --git a/chrome/browser/download/download_prefs.cc b/chrome/browser/download/download_prefs.cc
index 61540ec163a5bceabe4bbecb88cb2eaefc808d78..d7fe28e77f509bba5cfc661eb1d8c7b26d660056 100644
--- a/chrome/browser/download/download_prefs.cc
+++ b/chrome/browser/download/download_prefs.cc
@@ -138,9 +138,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profile_(profile) {
#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
should_open_pdf_in_system_reader_ =
- prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader) ||
- prefs->GetBoolean(prefs::kPluginsAlwaysOpenPdfExternally);
- disable_adobe_version_check_for_tests_ = false;
+ prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader);
#endif
// If the download path is dangerous we forcefully reset it. But if we do
@@ -342,26 +340,22 @@ void DownloadPrefs::DisableAutoOpenBasedOnExtension(
#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) {
- should_open_pdf_in_system_reader_ = should_open ||
- profile_->GetPrefs()->GetBoolean(prefs::kPluginsAlwaysOpenPdfExternally);
+ if (should_open_pdf_in_system_reader_ == should_open)
+ return;
+ should_open_pdf_in_system_reader_ = should_open;
profile_->GetPrefs()->SetBoolean(prefs::kOpenPdfDownloadInSystemReader,
should_open);
}
bool DownloadPrefs::ShouldOpenPdfInSystemReader() const {
#if defined(OS_WIN)
- if (!disable_adobe_version_check_for_tests_ &&
- IsAdobeReaderDefaultPDFViewer() &&
+ if (IsAdobeReaderDefaultPDFViewer() &&
!DownloadTargetDeterminer::IsAdobeReaderUpToDate()) {
return false;
}
#endif
return should_open_pdf_in_system_reader_;
}
-
-void DownloadPrefs::DisableAdobeVersionCheckForTests() {
- disable_adobe_version_check_for_tests_ = true;
-}
#endif
void DownloadPrefs::ResetAutoOpen() {
« no previous file with comments | « chrome/browser/download/download_prefs.h ('k') | chrome/browser/download/download_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698