| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/download/download_create_info.h" | 5 #include "chrome/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" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 url_chain(1, url), | 21 url_chain(1, url), |
| 22 path_uniquifier(0), | 22 path_uniquifier(0), |
| 23 start_time(start_time), | 23 start_time(start_time), |
| 24 received_bytes(received_bytes), | 24 received_bytes(received_bytes), |
| 25 total_bytes(total_bytes), | 25 total_bytes(total_bytes), |
| 26 state(state), | 26 state(state), |
| 27 download_id(download_id), | 27 download_id(download_id), |
| 28 has_user_gesture(has_user_gesture), | 28 has_user_gesture(has_user_gesture), |
| 29 db_handle(0), | 29 db_handle(0), |
| 30 prompt_user_for_save_location(false), | 30 prompt_user_for_save_location(false), |
| 31 is_dangerous_file(false), | |
| 32 is_dangerous_url(false), | |
| 33 is_extension_install(false) { | 31 is_extension_install(false) { |
| 34 } | 32 } |
| 35 | 33 |
| 36 DownloadCreateInfo::DownloadCreateInfo() | 34 DownloadCreateInfo::DownloadCreateInfo() |
| 37 : path_uniquifier(0), | 35 : path_uniquifier(0), |
| 38 received_bytes(0), | 36 received_bytes(0), |
| 39 total_bytes(0), | 37 total_bytes(0), |
| 40 state(-1), | 38 state(-1), |
| 41 download_id(-1), | 39 download_id(-1), |
| 42 has_user_gesture(false), | 40 has_user_gesture(false), |
| 43 db_handle(0), | 41 db_handle(0), |
| 44 prompt_user_for_save_location(false), | 42 prompt_user_for_save_location(false), |
| 45 is_dangerous_file(false), | |
| 46 is_dangerous_url(false), | |
| 47 is_extension_install(false) { | 43 is_extension_install(false) { |
| 48 } | 44 } |
| 49 | 45 |
| 50 DownloadCreateInfo::~DownloadCreateInfo() { | 46 DownloadCreateInfo::~DownloadCreateInfo() { |
| 51 } | 47 } |
| 52 | 48 |
| 53 std::string DownloadCreateInfo::DebugString() const { | 49 std::string DownloadCreateInfo::DebugString() const { |
| 54 return base::StringPrintf("{" | 50 return base::StringPrintf("{" |
| 55 " download_id = %d" | 51 " download_id = %d" |
| 56 " url = \"%s\"" | 52 " url = \"%s\"" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 69 total_bytes, | 65 total_bytes, |
| 70 process_handle.child_id(), | 66 process_handle.child_id(), |
| 71 process_handle.render_view_id(), | 67 process_handle.render_view_id(), |
| 72 process_handle.request_id(), | 68 process_handle.request_id(), |
| 73 prompt_user_for_save_location ? 'T' : 'F'); | 69 prompt_user_for_save_location ? 'T' : 'F'); |
| 74 } | 70 } |
| 75 | 71 |
| 76 const GURL& DownloadCreateInfo::url() const { | 72 const GURL& DownloadCreateInfo::url() const { |
| 77 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); | 73 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); |
| 78 } | 74 } |
| OLD | NEW |