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

Unified Diff: chrome/browser/download/download_target_determiner.h

Issue 390983004: Merge 281172 "Windows: Add an "Open in Adobe Reader" menu item f..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 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
Index: chrome/browser/download/download_target_determiner.h
===================================================================
--- chrome/browser/download/download_target_determiner.h (revision 283043)
+++ chrome/browser/download/download_target_determiner.h (working copy)
@@ -79,6 +79,13 @@
// 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
@@ -93,6 +100,7 @@
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,
@@ -205,13 +213,27 @@
// 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.
// Next state:
« no previous file with comments | « chrome/browser/download/download_shelf_context_menu.cc ('k') | chrome/browser/download/download_target_determiner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698