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

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
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 MarkUrlDangerous(); 280 void SetFileDangerous(bool dangerous);
Randy Smith (Not in Mondays) 2011/05/24 18:28:25 This accessor doesn't look like it's used outside
Peter Kasting 2011/05/24 20:55:00 You're right that it's only used in tests, but how
Randy Smith (Not in Mondays) 2011/05/24 21:48:56 You could use SetFileCheckResults based on a Downl
281 void SetUrlDangerous(bool dangerous);
Randy Smith (Not in Mondays) 2011/05/24 18:28:25 This may be an area where we disagree, but I'm try
282 void SetVisitedBefore(bool visited_referrer_before);
Randy Smith (Not in Mondays) 2011/05/24 18:28:25 Similarly, could you drop the argument and just ca
281 283
282 bool auto_opened() { return auto_opened_; } 284 bool auto_opened() { return auto_opened_; }
283 FilePath target_name() const { return state_info_.target_name; } 285 FilePath target_name() const { return state_info_.target_name; }
284 bool save_as() const { return state_info_.prompt_user_for_save_location; } 286 bool save_as() const { return state_info_.prompt_user_for_save_location; }
285 bool is_otr() const { return is_otr_; } 287 bool is_otr() const { return is_otr_; }
286 bool is_extension_install() const { 288 bool is_extension_install() const {
287 return state_info_.is_extension_install; 289 return state_info_.is_extension_install;
288 } 290 }
289 FilePath suggested_path() const { return state_info_.suggested_path; } 291 FilePath suggested_path() const { return state_info_.suggested_path; }
290 bool is_temporary() const { return is_temporary_; } 292 bool is_temporary() const { return is_temporary_; }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 // Did the user open the item either directly or indirectly (such as by 428 // 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 429 // 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 430 // when the user closes the shelf before the item has been opened but should
429 // be treated as though the user opened it. 431 // be treated as though the user opened it.
430 bool opened_; 432 bool opened_;
431 433
432 DISALLOW_COPY_AND_ASSIGN(DownloadItem); 434 DISALLOW_COPY_AND_ASSIGN(DownloadItem);
433 }; 435 };
434 436
435 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_ 437 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698