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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_target_determiner_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_target_info.h
diff --git a/chrome/browser/download/download_target_info.h b/chrome/browser/download/download_target_info.h
new file mode 100644
index 0000000000000000000000000000000000000000..9a7a63be49f69763152505b618f41414d5978b13
--- /dev/null
+++ b/chrome/browser/download/download_target_info.h
@@ -0,0 +1,47 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_INFO_H_
+#define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_INFO_H_
+
+#include "base/files/file_path.h"
+#include "content/public/browser/download_danger_type.h"
+#include "content/public/browser/download_item.h"
+
+struct DownloadTargetInfo {
+ DownloadTargetInfo();
+ ~DownloadTargetInfo();
+
+ // Final full target path of the download. Must be non-empty for the remaining
+ // fields to be considered valid. The path is a local file system path. Any
+ // existing file at this path should be overwritten.
+ base::FilePath target_path;
+
+ // Disposition. This will be TARGET_DISPOSITION_PROMPT if the user was
+ // prompted during the process of determining the download target. Otherwise
+ // it will be TARGET_DISPOSITION_OVERWRITE.
+ content::DownloadItem::TargetDisposition target_disposition;
+
+ // Danger type of the download.
+ content::DownloadDangerType danger_type;
+
+ // Suggested intermediate path. The downloaded bytes should be written to this
+ // path until all the bytes are available and the user has accepted a
+ // dangerous download. At that point, the download can be renamed to
+ // |target_path|.
+ base::FilePath intermediate_path;
+
+ // MIME type based on the file type of the download. This may be different
+ // from DownloadItem::GetMimeType() since the latter is based on the server
+ // response, and this one is based on the filename.
+ std::string mime_type;
+
+ // Whether the |target_path| would be handled safely by the browser if it were
+ // to be opened with a file:// URL. This can be used later to decide how file
+ // opens should be handled. The file is considered to be handled safely if the
+ // filetype is supported by the renderer or a sandboxed plug-in.
+ bool is_filetype_handled_securely;
+};
+
+#endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_TARGET_INFO_H_
« 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