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

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

Issue 1728583002: Simplify DownloadRequestHandle by using WebContentsGetter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: default callback constructor Created 4 years, 10 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/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 12 matching lines...) Expand all
23 save_info(std::move(save_info)), 23 save_info(std::move(save_info)),
24 request_bound_net_log(bound_net_log) {} 24 request_bound_net_log(bound_net_log) {}
25 25
26 DownloadCreateInfo::DownloadCreateInfo() 26 DownloadCreateInfo::DownloadCreateInfo()
27 : DownloadCreateInfo(base::Time(), 27 : DownloadCreateInfo(base::Time(),
28 net::BoundNetLog(), 28 net::BoundNetLog(),
29 make_scoped_ptr(new DownloadSaveInfo)) {} 29 make_scoped_ptr(new DownloadSaveInfo)) {}
30 30
31 DownloadCreateInfo::~DownloadCreateInfo() {} 31 DownloadCreateInfo::~DownloadCreateInfo() {}
32 32
33 std::string DownloadCreateInfo::DebugString() const {
34 return base::StringPrintf(
35 "{"
36 " download_id = %u"
37 " url = \"%s\""
38 " request_handle = %s"
39 " total_bytes = %" PRId64 " }",
40 download_id, url().spec().c_str(), request_handle->DebugString().c_str(),
41 total_bytes);
42 }
43
44 const GURL& DownloadCreateInfo::url() const { 33 const GURL& DownloadCreateInfo::url() const {
45 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); 34 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back();
46 } 35 }
47 36
48 } // namespace content 37 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/download/download_create_info.h ('k') | content/browser/download/download_request_handle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698