summaryrefslogtreecommitdiffstats
path: root/chrome/browser/download/download_stats.h
diff options
context:
space:
mode:
authorhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 06:13:54 +0000
committerhashimoto@chromium.org <hashimoto@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-07 06:13:54 +0000
commit34d3d441d8a02cf9ec4c3586ee762e022ee6cbf5 (patch)
tree8022f145127b3147465885703300196cfd051821 /chrome/browser/download/download_stats.h
parent8246ed39313592547db84a47ca5b4ae6d65221d9 (diff)
downloadchromium_src-34d3d441d8a02cf9ec4c3586ee762e022ee6cbf5.zip
chromium_src-34d3d441d8a02cf9ec4c3586ee762e022ee6cbf5.tar.gz
chromium_src-34d3d441d8a02cf9ec4c3586ee762e022ee6cbf5.tar.bz2
Revert 233460 "Prefer opening PDF downloads in the browser."
Caused "PluginPrefsTest.UnifiedPepperFlashState" failure on "Linux Clang (dbg)" BUG=316017 > Prefer opening PDF downloads in the browser. > > PDFs in particular are safer to open in the browser. This patch changes > the handling of downloads to open such files in the browser by default > instead of the system handler for the file type. A "Open with system > handler" menu item will be available so that users can still use the > system application if needed. > > The determination that a file is safer to handle in the browser is done > as follows: > > a) DownloadTargetDeterminer determines whether the MIME type > corresponding to the target filename of the download is one which is > handled by the renderer or one that is handled by a sandboxed pepper > plugin. If so, then the file is considered safely handled by the > browser. > > b) ChromeDownloadManagerDelegate determines whether opening in the > browser is preferred for the file type assuming the browser is able > to handle it safely. Currently this is true for .pdf files. > > Opening behavior for a download will default to opening in the browser > if both results from a) and b) are true. > > BUG=148492 > > TEST=(1) Make sure Chrome PDF Viewer is enabled in chrome://plugins. > (2) Download a .pdf file. > (3) Download shelf context menu should show "Open" and "Open with > system handler" options. > (4) "Open" as well as clicking on the shelf icon and clicking on > the download in chrome://downloads should all result in opening > the file within the browser. > (5) "Open with system handler" should open the .pdf with the > application that's set up as the default handler for .pdf files > on the users' machine. > > Review URL: https://codereview.chromium.org/55063002 TBR=asanka@chromium.org Review URL: https://codereview.chromium.org/61623006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233497 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download/download_stats.h')
-rw-r--r--chrome/browser/download/download_stats.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/chrome/browser/download/download_stats.h b/chrome/browser/download/download_stats.h
index ece9243..b84091f 100644
--- a/chrome/browser/download/download_stats.h
+++ b/chrome/browser/download/download_stats.h
@@ -56,23 +56,6 @@ enum ChromeDownloadSource {
CHROME_DOWNLOAD_SOURCE_LAST_ENTRY,
};
-// How a download was opened. Note that a download could be opened multiple
-// times.
-enum ChromeDownloadOpenMethod {
- // The download was opened using the platform handler. There was no special
- // handling for this download.
- DOWNLOAD_OPEN_METHOD_DEFAULT_PLATFORM = 0,
-
- // The download was opened using the browser bypassing the system handler.
- DOWNLOAD_OPEN_METHOD_DEFAULT_BROWSER,
-
- // The user chose to open the download using the system handler even though
- // the preferred method was to open the download using the browser.
- DOWNLOAD_OPEN_METHOD_USER_PLATFORM,
-
- DOWNLOAD_OPEN_METHOD_LAST_ENTRY
-};
-
// Increment one of the above counts.
void RecordDownloadCount(ChromeDownloadCountTypes type);
@@ -83,7 +66,4 @@ void RecordDownloadSource(ChromeDownloadSource source);
void RecordOpenedDangerousConfirmDialog(
content::DownloadDangerType danger_type);
-// Record how a download was opened.
-void RecordDownloadOpenMethod(ChromeDownloadOpenMethod open_method);
-
#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_STATS_H_