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

Side by Side Diff: content/browser/download/download_create_info.cc

Issue 2689373003: Introduce ParallelDownloadJob. (Closed)
Patch Set: nits. Created 3 years, 9 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
OLDNEW
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 has_user_gesture(false), 22 has_user_gesture(false),
23 result(DOWNLOAD_INTERRUPT_REASON_NONE), 23 result(DOWNLOAD_INTERRUPT_REASON_NONE),
24 save_info(std::move(save_info)), 24 save_info(std::move(save_info)),
25 request_net_log(net_log) {} 25 request_net_log(net_log),
26 accept_range(false) {}
26 27
27 DownloadCreateInfo::DownloadCreateInfo() 28 DownloadCreateInfo::DownloadCreateInfo()
28 : DownloadCreateInfo(base::Time(), 29 : DownloadCreateInfo(base::Time(),
29 net::NetLogWithSource(), 30 net::NetLogWithSource(),
30 base::WrapUnique(new DownloadSaveInfo)) {} 31 base::WrapUnique(new DownloadSaveInfo)) {}
31 32
32 DownloadCreateInfo::~DownloadCreateInfo() {} 33 DownloadCreateInfo::~DownloadCreateInfo() {}
33 34
34 const GURL& DownloadCreateInfo::url() const { 35 const GURL& DownloadCreateInfo::url() const {
35 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); 36 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back();
36 } 37 }
37 38
38 } // namespace content 39 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_create_info.h ('k') | content/browser/download/download_item_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698