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

Unified 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: Stupid clang! 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/download/download_state_info.h ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_state_info.cc
diff --git a/chrome/browser/download/download_state_info.cc b/chrome/browser/download/download_state_info.cc
new file mode 100644
index 0000000000000000000000000000000000000000..7df6b4f7c370871c77800eecf6bc884436b556d6
--- /dev/null
+++ b/chrome/browser/download/download_state_info.cc
@@ -0,0 +1,51 @@
+
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/download/download_state_info.h"
+
+#include "chrome/browser/download/download_item.h"
+
+DownloadStateInfo::DownloadStateInfo()
+ : path_uniquifier(0),
+ has_user_gesture(false),
+ prompt_user_for_save_location(false),
+ is_dangerous_file(false),
+ is_dangerous_url(false),
+ is_extension_install(false) {
+}
+
+DownloadStateInfo::DownloadStateInfo(
+ bool has_user_gesture,
+ bool prompt_user_for_save_location)
+ : path_uniquifier(0),
+ has_user_gesture(has_user_gesture),
+ prompt_user_for_save_location(prompt_user_for_save_location),
+ is_dangerous_file(false),
+ is_dangerous_url(false),
+ is_extension_install(false) {
+}
+
+DownloadStateInfo::DownloadStateInfo(
+ const FilePath& target,
+ const FilePath& forced_name,
+ bool has_user_gesture,
+ bool prompt_user_for_save_location,
+ int uniquifier,
+ bool dangerous_file,
+ bool dangerous_url,
+ bool extension_install)
+ : target_name(target),
+ path_uniquifier(uniquifier),
+ has_user_gesture(has_user_gesture),
+ prompt_user_for_save_location(prompt_user_for_save_location),
+ is_dangerous_file(dangerous_file),
+ is_dangerous_url(dangerous_url),
+ is_extension_install(extension_install),
+ force_file_name(forced_name) {
+}
+
+bool DownloadStateInfo::IsDangerous() const {
+ return is_dangerous_url || is_dangerous_file;
+}
« no previous file with comments | « chrome/browser/download/download_state_info.h ('k') | chrome/browser/download/download_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698