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

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

Issue 160243: Merge 21612 - Implement mimetype sniffing for extensions.... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/chrome/browser/download/download_manager.h:r69-2775
Merged /trunk/src/chrome/browser/download/download_manager.h:r21612
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 // The DownloadManager object manages the process of downloading, including 5 // The DownloadManager object manages the process of downloading, including
6 // updates to the history system and providing the information for displaying 6 // updates to the history system and providing the information for displaying
7 // the downloads view in the Destinations tab. There is one DownloadManager per 7 // the downloads view in the Destinations tab. There is one DownloadManager per
8 // active profile in Chrome. 8 // active profile in Chrome.
9 // 9 //
10 // Each download is represented by a DownloadItem, and all DownloadItems 10 // Each download is represented by a DownloadItem, and all DownloadItems
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 }; 101 };
102 102
103 // Constructing from persistent store: 103 // Constructing from persistent store:
104 DownloadItem(const DownloadCreateInfo& info); 104 DownloadItem(const DownloadCreateInfo& info);
105 105
106 // Constructing from user action: 106 // Constructing from user action:
107 DownloadItem(int32 download_id, 107 DownloadItem(int32 download_id,
108 const FilePath& path, 108 const FilePath& path,
109 int path_uniquifier, 109 int path_uniquifier,
110 const GURL& url, 110 const GURL& url,
111 const std::string& mime_type,
111 const FilePath& original_name, 112 const FilePath& original_name,
112 const base::Time start_time, 113 const base::Time start_time,
113 int64 download_size, 114 int64 download_size,
114 int render_process_id, 115 int render_process_id,
115 int request_id, 116 int request_id,
116 bool is_dangerous); 117 bool is_dangerous);
117 118
118 ~DownloadItem(); 119 ~DownloadItem();
119 120
120 void Init(bool start_timer); 121 void Init(bool start_timer);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 178
178 // Accessors 179 // Accessors
179 DownloadState state() const { return state_; } 180 DownloadState state() const { return state_; }
180 FilePath file_name() const { return file_name_; } 181 FilePath file_name() const { return file_name_; }
181 void set_file_name(const FilePath& name) { file_name_ = name; } 182 void set_file_name(const FilePath& name) { file_name_ = name; }
182 FilePath full_path() const { return full_path_; } 183 FilePath full_path() const { return full_path_; }
183 void set_full_path(const FilePath& path) { full_path_ = path; } 184 void set_full_path(const FilePath& path) { full_path_ = path; }
184 int path_uniquifier() const { return path_uniquifier_; } 185 int path_uniquifier() const { return path_uniquifier_; }
185 void set_path_uniquifier(int uniquifier) { path_uniquifier_ = uniquifier; } 186 void set_path_uniquifier(int uniquifier) { path_uniquifier_ = uniquifier; }
186 GURL url() const { return url_; } 187 GURL url() const { return url_; }
188 std::string mime_type() const { return mime_type_; }
187 int64 total_bytes() const { return total_bytes_; } 189 int64 total_bytes() const { return total_bytes_; }
188 void set_total_bytes(int64 total_bytes) { total_bytes_ = total_bytes; } 190 void set_total_bytes(int64 total_bytes) { total_bytes_ = total_bytes; }
189 int64 received_bytes() const { return received_bytes_; } 191 int64 received_bytes() const { return received_bytes_; }
190 int32 id() const { return id_; } 192 int32 id() const { return id_; }
191 base::Time start_time() const { return start_time_; } 193 base::Time start_time() const { return start_time_; }
192 void set_db_handle(int64 handle) { db_handle_ = handle; } 194 void set_db_handle(int64 handle) { db_handle_ = handle; }
193 int64 db_handle() const { return db_handle_; } 195 int64 db_handle() const { return db_handle_; }
194 DownloadManager* manager() const { return manager_; } 196 DownloadManager* manager() const { return manager_; }
195 void set_manager(DownloadManager* manager) { manager_ = manager; } 197 void set_manager(DownloadManager* manager) { manager_ = manager; }
196 bool is_paused() const { return is_paused_; } 198 bool is_paused() const { return is_paused_; }
(...skipping 29 matching lines...) Expand all
226 // A number that should be appended to the path to make it unique, or 0 if the 228 // A number that should be appended to the path to make it unique, or 0 if the
227 // path should be used as is. 229 // path should be used as is.
228 int path_uniquifier_; 230 int path_uniquifier_;
229 231
230 // Short display version of the file 232 // Short display version of the file
231 FilePath file_name_; 233 FilePath file_name_;
232 234
233 // The URL from whence we came. 235 // The URL from whence we came.
234 GURL url_; 236 GURL url_;
235 237
238 // The mimetype of the download
239 std::string mime_type_;
240
236 // Total bytes expected 241 // Total bytes expected
237 int64 total_bytes_; 242 int64 total_bytes_;
238 243
239 // Current received bytes 244 // Current received bytes
240 int64 received_bytes_; 245 int64 received_bytes_;
241 246
242 // Start time for calculating remaining time 247 // Start time for calculating remaining time
243 base::TimeTicks start_tick_; 248 base::TimeTicks start_tick_;
244 249
245 // The current state of this download 250 // The current state of this download
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 PendingFinishedMap pending_finished_downloads_; 603 PendingFinishedMap pending_finished_downloads_;
599 604
600 // The "Save As" dialog box used to ask the user where a file should be 605 // The "Save As" dialog box used to ask the user where a file should be
601 // saved. 606 // saved.
602 scoped_refptr<SelectFileDialog> select_file_dialog_; 607 scoped_refptr<SelectFileDialog> select_file_dialog_;
603 608
604 DISALLOW_COPY_AND_ASSIGN(DownloadManager); 609 DISALLOW_COPY_AND_ASSIGN(DownloadManager);
605 }; 610 };
606 611
607 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 612 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698