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/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 DownloadCreateInfo::DownloadCreateInfo(const base::Time& start_time, | 14 DownloadCreateInfo::DownloadCreateInfo(const base::Time& start_time, |
15 int64 total_bytes, | 15 int64_t total_bytes, |
16 const net::BoundNetLog& bound_net_log, | 16 const net::BoundNetLog& bound_net_log, |
17 scoped_ptr<DownloadSaveInfo> save_info) | 17 scoped_ptr<DownloadSaveInfo> save_info) |
18 : start_time(start_time), | 18 : start_time(start_time), |
19 total_bytes(total_bytes), | 19 total_bytes(total_bytes), |
20 download_id(DownloadItem::kInvalidId), | 20 download_id(DownloadItem::kInvalidId), |
21 has_user_gesture(false), | 21 has_user_gesture(false), |
22 transition_type(ui::PAGE_TRANSITION_LINK), | 22 transition_type(ui::PAGE_TRANSITION_LINK), |
23 save_info(save_info.Pass()), | 23 save_info(save_info.Pass()), |
24 request_bound_net_log(bound_net_log) {} | 24 request_bound_net_log(bound_net_log) {} |
25 | 25 |
(...skipping 14 matching lines...) Expand all Loading... |
40 " total_bytes = %" PRId64 " }", | 40 " total_bytes = %" PRId64 " }", |
41 download_id, url().spec().c_str(), request_handle->DebugString().c_str(), | 41 download_id, url().spec().c_str(), request_handle->DebugString().c_str(), |
42 total_bytes); | 42 total_bytes); |
43 } | 43 } |
44 | 44 |
45 const GURL& DownloadCreateInfo::url() const { | 45 const GURL& DownloadCreateInfo::url() const { |
46 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); | 46 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); |
47 } | 47 } |
48 | 48 |
49 } // namespace content | 49 } // namespace content |
OLD | NEW |