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

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

Issue 159483: Revert 21800 - 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:
Modified: svn:mergeinfo
Reverse-merged /branches/chrome_webkit_merge_branch/chrome/browser/download/download_manager.h:r69-2775
Reverse-merged /trunk/src/chrome/browser/download/download_manager.h:r21321,21612
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,
112 const FilePath& original_name, 111 const FilePath& original_name,
113 const base::Time start_time, 112 const base::Time start_time,
114 int64 download_size, 113 int64 download_size,
115 int render_process_id, 114 int render_process_id,
116 int request_id, 115 int request_id,
117 bool is_dangerous); 116 bool is_dangerous);
118 117
119 ~DownloadItem(); 118 ~DownloadItem();
120 119
121 void Init(bool start_timer); 120 void Init(bool start_timer);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 177
179 // Accessors 178 // Accessors
180 DownloadState state() const { return state_; } 179 DownloadState state() const { return state_; }
181 FilePath file_name() const { return file_name_; } 180 FilePath file_name() const { return file_name_; }
182 void set_file_name(const FilePath& name) { file_name_ = name; } 181 void set_file_name(const FilePath& name) { file_name_ = name; }
183 FilePath full_path() const { return full_path_; } 182 FilePath full_path() const { return full_path_; }
184 void set_full_path(const FilePath& path) { full_path_ = path; } 183 void set_full_path(const FilePath& path) { full_path_ = path; }
185 int path_uniquifier() const { return path_uniquifier_; } 184 int path_uniquifier() const { return path_uniquifier_; }
186 void set_path_uniquifier(int uniquifier) { path_uniquifier_ = uniquifier; } 185 void set_path_uniquifier(int uniquifier) { path_uniquifier_ = uniquifier; }
187 GURL url() const { return url_; } 186 GURL url() const { return url_; }
188 std::string mime_type() const { return mime_type_; }
189 int64 total_bytes() const { return total_bytes_; } 187 int64 total_bytes() const { return total_bytes_; }
190 void set_total_bytes(int64 total_bytes) { total_bytes_ = total_bytes; } 188 void set_total_bytes(int64 total_bytes) { total_bytes_ = total_bytes; }
191 int64 received_bytes() const { return received_bytes_; } 189 int64 received_bytes() const { return received_bytes_; }
192 int32 id() const { return id_; } 190 int32 id() const { return id_; }
193 base::Time start_time() const { return start_time_; } 191 base::Time start_time() const { return start_time_; }
194 void set_db_handle(int64 handle) { db_handle_ = handle; } 192 void set_db_handle(int64 handle) { db_handle_ = handle; }
195 int64 db_handle() const { return db_handle_; } 193 int64 db_handle() const { return db_handle_; }
196 DownloadManager* manager() const { return manager_; } 194 DownloadManager* manager() const { return manager_; }
197 void set_manager(DownloadManager* manager) { manager_ = manager; } 195 void set_manager(DownloadManager* manager) { manager_ = manager; }
198 bool is_paused() const { return is_paused_; } 196 bool is_paused() const { return is_paused_; }
(...skipping 29 matching lines...) Expand all
228 // A number that should be appended to the path to make it unique, or 0 if the 226 // A number that should be appended to the path to make it unique, or 0 if the
229 // path should be used as is. 227 // path should be used as is.
230 int path_uniquifier_; 228 int path_uniquifier_;
231 229
232 // Short display version of the file 230 // Short display version of the file
233 FilePath file_name_; 231 FilePath file_name_;
234 232
235 // The URL from whence we came. 233 // The URL from whence we came.
236 GURL url_; 234 GURL url_;
237 235
238 // The mimetype of the download
239 std::string mime_type_;
240
241 // Total bytes expected 236 // Total bytes expected
242 int64 total_bytes_; 237 int64 total_bytes_;
243 238
244 // Current received bytes 239 // Current received bytes
245 int64 received_bytes_; 240 int64 received_bytes_;
246 241
247 // Start time for calculating remaining time 242 // Start time for calculating remaining time
248 base::TimeTicks start_tick_; 243 base::TimeTicks start_tick_;
249 244
250 // The current state of this download 245 // The current state of this download
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 PendingFinishedMap pending_finished_downloads_; 598 PendingFinishedMap pending_finished_downloads_;
604 599
605 // The "Save As" dialog box used to ask the user where a file should be 600 // The "Save As" dialog box used to ask the user where a file should be
606 // saved. 601 // saved.
607 scoped_refptr<SelectFileDialog> select_file_dialog_; 602 scoped_refptr<SelectFileDialog> select_file_dialog_;
608 603
609 DISALLOW_COPY_AND_ASSIGN(DownloadManager); 604 DISALLOW_COPY_AND_ASSIGN(DownloadManager);
610 }; 605 };
611 606
612 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_MANAGER_H_ 607 #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