summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_target_determiner.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/download/download_target_determiner.h')
-rw-r--r--chrome/browser/download/download_target_determiner.h24
1 files changed, 23 insertions, 1 deletions
diff --git a/chrome/browser/download/download_target_determiner.h b/chrome/browser/download/download_target_determiner.h
index f57341d..8cca804 100644
--- a/chrome/browser/download/download_target_determiner.h
+++ b/chrome/browser/download/download_target_determiner.h
@@ -80,6 +80,13 @@ class DownloadTargetDeterminer
// Returns a .crdownload intermediate path for the |suggested_path|.
static base::FilePath GetCrDownloadPath(const base::FilePath& suggested_path);
+#if defined(OS_WIN)
+ // Returns true if Adobe Reader is up to date. This information refreshed
+ // only when Start() gets called for a PDF and Adobe Reader is the default
+ // System PDF viewer.
+ static bool IsAdobeReaderUpToDate();
+#endif
+
private:
// The main workflow is controlled via a set of state transitions. Each state
// has an associated handler. The handler for STATE_FOO is DoFoo. Each handler
@@ -94,6 +101,7 @@ class DownloadTargetDeterminer
STATE_DETERMINE_LOCAL_PATH,
STATE_DETERMINE_MIME_TYPE,
STATE_DETERMINE_IF_HANDLED_SAFELY_BY_BROWSER,
+ STATE_DETERMINE_IF_ADOBE_READER_UP_TO_DATE,
STATE_CHECK_DOWNLOAD_URL,
STATE_CHECK_VISITED_REFERRER_BEFORE,
STATE_DETERMINE_INTERMEDIATE_PATH,
@@ -206,12 +214,26 @@ class DownloadTargetDeterminer
// Determine if the file type can be handled safely by the browser if it were
// to be opened via a file:// URL.
// Next state:
- // - STATE_CHECK_DOWNLOAD_URL.
+ // - STATE_DETERMINE_IF_ADOBE_READER_UP_TO_DATE.
Result DoDetermineIfHandledSafely();
+#if defined(ENABLE_PLUGINS)
// Callback invoked when a decision is available about whether the file type
// can be handled safely by the browser.
void DetermineIfHandledSafelyDone(bool is_handled_safely);
+#endif
+
+ // Determine if Adobe Reader is up to date. Only do the check on Windows for
+ // .pdf file targets.
+ // Next state:
+ // - STATE_CHECK_DOWNLOAD_URL.
+ Result DoDetermineIfAdobeReaderUpToDate();
+
+#if defined(OS_WIN)
+ // Callback invoked when a decision is available about whether Adobe Reader
+ // is up to date.
+ void DetermineIfAdobeReaderUpToDateDone(bool adobe_reader_up_to_date);
+#endif
// Checks whether the downloaded URL is malicious. Invokes the
// DownloadProtectionService via the delegate.