| 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 "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" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 DownloadCreateInfo::~DownloadCreateInfo() { | 47 DownloadCreateInfo::~DownloadCreateInfo() { |
| 48 } | 48 } |
| 49 | 49 |
| 50 std::string DownloadCreateInfo::DebugString() const { | 50 std::string DownloadCreateInfo::DebugString() const { |
| 51 return base::StringPrintf("{" | 51 return base::StringPrintf("{" |
| 52 " download_id = %d" | 52 " download_id = %d" |
| 53 " url = \"%s\"" | 53 " url = \"%s\"" |
| 54 " path = \"%" PRFilePath "\"" | 54 " path = \"%" PRFilePath "\"" |
| 55 " received_bytes = %" PRId64 | 55 " received_bytes = %" PRId64 |
| 56 " total_bytes = %" PRId64 | 56 " total_bytes = %" PRId64 |
| 57 " request_handle = %s" | |
| 58 " prompt_user_for_save_location = %c" | 57 " prompt_user_for_save_location = %c" |
| 59 " }", | 58 " }", |
| 60 download_id, | 59 download_id, |
| 61 url().spec().c_str(), | 60 url().spec().c_str(), |
| 62 path.value().c_str(), | 61 path.value().c_str(), |
| 63 received_bytes, | 62 received_bytes, |
| 64 total_bytes, | 63 total_bytes, |
| 65 request_handle.DebugString().c_str(), | |
| 66 prompt_user_for_save_location ? 'T' : 'F'); | 64 prompt_user_for_save_location ? 'T' : 'F'); |
| 67 } | 65 } |
| 68 | 66 |
| 69 const GURL& DownloadCreateInfo::url() const { | 67 const GURL& DownloadCreateInfo::url() const { |
| 70 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); | 68 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); |
| 71 } | 69 } |
| OLD | NEW |