OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/download/download_create_info.h" | 5 #include "content/browser/download/download_create_info.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/format_macros.h" | 9 #include "base/format_macros.h" |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 #include "base/strings/stringprintf.h" | 11 #include "base/strings/stringprintf.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 DownloadCreateInfo::DownloadCreateInfo( | 15 DownloadCreateInfo::DownloadCreateInfo( |
16 const base::Time& start_time, | 16 const base::Time& start_time, |
17 const net::NetLogWithSource& net_log, | 17 const net::NetLogWithSource& net_log, |
18 std::unique_ptr<DownloadSaveInfo> save_info) | 18 std::unique_ptr<DownloadSaveInfo> save_info) |
19 : download_id(DownloadItem::kInvalidId), | 19 : download_id(DownloadItem::kInvalidId), |
20 start_time(start_time), | 20 start_time(start_time), |
21 total_bytes(0), | 21 total_bytes(0), |
22 offset(0), | 22 offset(0), |
23 has_user_gesture(false), | 23 has_user_gesture(false), |
| 24 transient(false), |
24 result(DOWNLOAD_INTERRUPT_REASON_NONE), | 25 result(DOWNLOAD_INTERRUPT_REASON_NONE), |
25 save_info(std::move(save_info)), | 26 save_info(std::move(save_info)), |
26 request_net_log(net_log), | 27 request_net_log(net_log), |
27 accept_range(false), | 28 accept_range(false), |
28 connection_info(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN) {} | 29 connection_info(net::HttpResponseInfo::CONNECTION_INFO_UNKNOWN) {} |
29 | 30 |
30 DownloadCreateInfo::DownloadCreateInfo() | 31 DownloadCreateInfo::DownloadCreateInfo() |
31 : DownloadCreateInfo(base::Time(), | 32 : DownloadCreateInfo(base::Time(), |
32 net::NetLogWithSource(), | 33 net::NetLogWithSource(), |
33 base::WrapUnique(new DownloadSaveInfo)) {} | 34 base::WrapUnique(new DownloadSaveInfo)) {} |
34 | 35 |
35 DownloadCreateInfo::~DownloadCreateInfo() {} | 36 DownloadCreateInfo::~DownloadCreateInfo() {} |
36 | 37 |
37 const GURL& DownloadCreateInfo::url() const { | 38 const GURL& DownloadCreateInfo::url() const { |
38 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); | 39 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); |
39 } | 40 } |
40 | 41 |
41 } // namespace content | 42 } // namespace content |
OLD | NEW |