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

Side by Side Diff: chrome/browser/download/download_target_info.h

Issue 55063002: Prefer opening PDF downloads in the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Destroy PluginService once we are done with our plugin tests. Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_INFO_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_INFO_H_
7
8 #include "base/files/file_path.h"
9 #include "content/public/browser/download_danger_type.h"
10 #include "content/public/browser/download_item.h"
11
12 struct DownloadTargetInfo {
13 DownloadTargetInfo();
14 ~DownloadTargetInfo();
15
16 // Final full target path of the download. Must be non-empty for the remaining
17 // fields to be considered valid. The path is a local file system path. Any
18 // existing file at this path should be overwritten.
19 base::FilePath target_path;
20
21 // Disposition. This will be TARGET_DISPOSITION_PROMPT if the user was
22 // prompted during the process of determining the download target. Otherwise
23 // it will be TARGET_DISPOSITION_OVERWRITE.
24 content::DownloadItem::TargetDisposition target_disposition;
25
26 // Danger type of the download.
27 content::DownloadDangerType danger_type;
28
29 // Suggested intermediate path. The downloaded bytes should be written to this
30 // path until all the bytes are available and the user has accepted a
31 // dangerous download. At that point, the download can be renamed to
32 // |target_path|.
33 base::FilePath intermediate_path;
34
35 // MIME type based on the file type of the download. This may be different
36 // from DownloadItem::GetMimeType() since the latter is based on the server
37 // response, and this one is based on the filename.
38 std::string mime_type;
39
40 // Whether the |target_path| would be handled safely by the browser if it were
41 // to be opened with a file:// URL. This can be used later to decide how file
42 // opens should be handled. The file is considered to be handled safely if the
43 // filetype is supported by the renderer or a sandboxed plug-in.
44 bool is_filetype_handled_securely;
45 };
46
47 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_INFO_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_target_determiner_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698