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

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

Issue 7065015: For downloads requiring a user gesture, also require... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 | « chrome/browser/download/download_history.cc ('k') | chrome/browser/download/download_item.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Each download is represented by a DownloadItem, and all DownloadItems 5 // Each download is represented by a DownloadItem, and all DownloadItems
6 // are owned by the DownloadManager which maintains a global list of all 6 // are owned by the DownloadManager which maintains a global list of all
7 // downloads. DownloadItems are created when a user initiates a download, 7 // downloads. DownloadItems are created when a user initiates a download,
8 // and exist for the duration of the browser life time. 8 // and exist for the duration of the browser life time.
9 // 9 //
10 // Download observers: 10 // Download observers:
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 bool is_paused() const { return is_paused_; } 270 bool is_paused() const { return is_paused_; }
271 bool open_when_complete() const { return open_when_complete_; } 271 bool open_when_complete() const { return open_when_complete_; }
272 void set_open_when_complete(bool open) { open_when_complete_ = open; } 272 void set_open_when_complete(bool open) { open_when_complete_ = open; }
273 SafetyState safety_state() const { return safety_state_; } 273 SafetyState safety_state() const { return safety_state_; }
274 void set_safety_state(SafetyState safety_state) { 274 void set_safety_state(SafetyState safety_state) {
275 safety_state_ = safety_state; 275 safety_state_ = safety_state;
276 } 276 }
277 // Why |safety_state_| is not SAFE. 277 // Why |safety_state_| is not SAFE.
278 DangerType GetDangerType() const; 278 DangerType GetDangerType() const;
279 bool IsDangerous() const; 279 bool IsDangerous() const;
280 void MarkFileDangerous();
280 void MarkUrlDangerous(); 281 void MarkUrlDangerous();
281 282
282 bool auto_opened() { return auto_opened_; } 283 bool auto_opened() { return auto_opened_; }
283 FilePath target_name() const { return state_info_.target_name; } 284 FilePath target_name() const { return state_info_.target_name; }
284 bool save_as() const { return state_info_.prompt_user_for_save_location; } 285 bool save_as() const { return state_info_.prompt_user_for_save_location; }
285 bool is_otr() const { return is_otr_; } 286 bool is_otr() const { return is_otr_; }
286 bool is_extension_install() const { 287 bool is_extension_install() const {
287 return state_info_.is_extension_install; 288 return state_info_.is_extension_install;
288 } 289 }
289 FilePath suggested_path() const { return state_info_.suggested_path; } 290 FilePath suggested_path() const { return state_info_.suggested_path; }
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // Did the user open the item either directly or indirectly (such as by 427 // Did the user open the item either directly or indirectly (such as by
427 // setting always open files of this type)? The shelf also sets this field 428 // setting always open files of this type)? The shelf also sets this field
428 // when the user closes the shelf before the item has been opened but should 429 // when the user closes the shelf before the item has been opened but should
429 // be treated as though the user opened it. 430 // be treated as though the user opened it.
430 bool opened_; 431 bool opened_;
431 432
432 DISALLOW_COPY_AND_ASSIGN(DownloadItem); 433 DISALLOW_COPY_AND_ASSIGN(DownloadItem);
433 }; 434 };
434 435
435 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ 436 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/download/download_history.cc ('k') | chrome/browser/download/download_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698