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/stringprintf.h" | 10 #include "base/stringprintf.h" |
| 11 #include "content/browser/download/byte_stream.h" |
11 | 12 |
12 using content::DownloadId; | 13 using content::DownloadId; |
13 | 14 |
14 DownloadCreateInfo::DownloadCreateInfo( | 15 DownloadCreateInfo::DownloadCreateInfo( |
15 const base::Time& start_time, | 16 const base::Time& start_time, |
16 int64 received_bytes, | 17 int64 received_bytes, |
17 int64 total_bytes, | 18 int64 total_bytes, |
18 int32 state, | 19 int32 state, |
19 const net::BoundNetLog& bound_net_log, | 20 const net::BoundNetLog& bound_net_log, |
20 bool has_user_gesture, | 21 bool has_user_gesture, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 url().spec().c_str(), | 59 url().spec().c_str(), |
59 save_info.file_path.value().c_str(), | 60 save_info.file_path.value().c_str(), |
60 received_bytes, | 61 received_bytes, |
61 total_bytes, | 62 total_bytes, |
62 prompt_user_for_save_location ? 'T' : 'F'); | 63 prompt_user_for_save_location ? 'T' : 'F'); |
63 } | 64 } |
64 | 65 |
65 const GURL& DownloadCreateInfo::url() const { | 66 const GURL& DownloadCreateInfo::url() const { |
66 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); | 67 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); |
67 } | 68 } |
OLD | NEW |