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

Side by Side Diff: chrome/browser/download/download_state_info.cc

Issue 6969009: Reduced the lifetime of DownloadCreateInfo. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changed an early return to a DCHECK. 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
(Empty)
1
2 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style license that can be
4 // found in the LICENSE file.
5
6 #include "chrome/browser/download/download_state_info.h"
7
8 #include "chrome/browser/download/download_item.h"
9
10 DownloadStateInfo::DownloadStateInfo()
11 : path_uniquifier(0),
12 has_user_gesture(false),
13 prompt_user_for_save_location(false),
14 is_dangerous_file(false),
15 is_dangerous_url(false),
16 is_extension_install(false) {
17 }
18
19 DownloadStateInfo::DownloadStateInfo(
20 bool has_user_gesture,
21 bool prompt_user_for_save_location)
22 : path_uniquifier(0),
23 has_user_gesture(has_user_gesture),
24 prompt_user_for_save_location(prompt_user_for_save_location),
25 is_dangerous_file(false),
26 is_dangerous_url(false),
27 is_extension_install(false) {
28 }
29
30 DownloadStateInfo::DownloadStateInfo(
31 const FilePath& target,
32 const FilePath& forced_name,
33 bool has_user_gesture,
34 bool prompt_user_for_save_location,
35 int uniquifier,
36 bool dangerous_file,
37 bool dangerous_url,
38 bool extension_install)
39 : target_name(target),
40 path_uniquifier(uniquifier),
41 has_user_gesture(has_user_gesture),
42 prompt_user_for_save_location(prompt_user_for_save_location),
43 is_dangerous_file(dangerous_file),
44 is_dangerous_url(dangerous_url),
45 is_extension_install(extension_install),
46 force_file_name(forced_name) {
47 }
48
49 bool DownloadStateInfo::IsDangerous() const {
50 return is_dangerous_url || is_dangerous_file;
51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698