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

Side by Side Diff: content/browser/download/download_create_info.h

Issue 8404049: Added member data to classes to support download resumption. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged with trunk. Created 9 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 5 #ifndef CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 6 #define CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "content/browser/download/download_file.h" 15 #include "content/browser/download/download_file.h"
16 #include "content/browser/download/download_id.h" 16 #include "content/browser/download/interrupt_reasons.h"
17 #include "content/common/content_export.h" 17 #include "content/common/content_export.h"
18 #include "content/public/common/page_transition_types.h" 18 #include "content/public/common/page_transition_types.h"
19 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
20 20
21 // Used for informing the download manager of a new download, since we don't 21 // Used for informing the download manager of a new download, since we don't
22 // want to pass |DownloadItem|s between threads. 22 // want to pass |DownloadItem|s between threads.
23 struct CONTENT_EXPORT DownloadCreateInfo { 23 struct CONTENT_EXPORT DownloadCreateInfo {
24 DownloadCreateInfo(const FilePath& path, 24 DownloadCreateInfo(const FilePath& path,
25 const GURL& url, 25 const GURL& url,
26 const base::Time& start_time, 26 const base::Time& start_time,
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 std::string content_disposition; 80 std::string content_disposition;
81 81
82 // The mime type string from the response header (may be overridden). 82 // The mime type string from the response header (may be overridden).
83 std::string mime_type; 83 std::string mime_type;
84 84
85 // The value of the content type header sent with the downloaded item. It 85 // The value of the content type header sent with the downloaded item. It
86 // may be different from |mime_type|, which may be set based on heuristics 86 // may be different from |mime_type|, which may be set based on heuristics
87 // which may look at the file extension and first few bytes of the file. 87 // which may look at the file extension and first few bytes of the file.
88 std::string original_mime_type; 88 std::string original_mime_type;
89 89
90 // For restarting a download, the modification time of the file.
91 std::string last_modified;
92
93 // For restarting a download, the ETAG of the file.
94 std::string etag;
95
96 // Is continuing a download.
97 bool continued_download;
98
99 // Server error code, if any.
100 InterruptReason server_interrupt_reason;
101
90 // True if we should display the 'save as...' UI and prompt the user 102 // True if we should display the 'save as...' UI and prompt the user
91 // for the download location. 103 // for the download location.
92 // False if the UI should be supressed and the download performed to the 104 // False if the UI should be suppressed and the download performed to the
93 // default location. 105 // default location.
94 bool prompt_user_for_save_location; 106 bool prompt_user_for_save_location;
95 107
96 // The original name for a dangerous download. 108 // The original name for a dangerous download.
97 FilePath original_name; 109 FilePath original_name;
98 110
99 // The charset of the referring page where the download request comes from. 111 // The charset of the referring page where the download request comes from.
100 // It's used to construct a suggested filename. 112 // It's used to construct a suggested filename.
101 std::string referrer_charset; 113 std::string referrer_charset;
102 114
103 // The download file save info. 115 // The download file save info.
104 DownloadSaveInfo save_info; 116 DownloadSaveInfo save_info;
105 }; 117 };
106 118
107 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_ 119 #endif // CONTENT_BROWSER_DOWNLOAD_DOWNLOAD_CREATE_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698