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

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

Issue 10831302: Download resumption - Preliminary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fixed content unit tests. Created 8 years, 2 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/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 prompt_user_for_save_location(false) { 42 prompt_user_for_save_location(false) {
43 } 43 }
44 44
45 DownloadCreateInfo::~DownloadCreateInfo() { 45 DownloadCreateInfo::~DownloadCreateInfo() {
46 } 46 }
47 47
48 std::string DownloadCreateInfo::DebugString() const { 48 std::string DownloadCreateInfo::DebugString() const {
49 return base::StringPrintf("{" 49 return base::StringPrintf("{"
50 " download_id = %s" 50 " download_id = %s"
51 " url = \"%s\"" 51 " url = \"%s\""
52 " request_handle = %s"
52 " save_info.file_path = \"%" PRFilePath "\"" 53 " save_info.file_path = \"%" PRFilePath "\""
53 " received_bytes = %" PRId64 54 " received_bytes = %" PRId64
54 " total_bytes = %" PRId64 55 " total_bytes = %" PRId64
55 " prompt_user_for_save_location = %c" 56 " prompt_user_for_save_location = %c"
56 " }", 57 " }",
57 download_id.DebugString().c_str(), 58 download_id.DebugString().c_str(),
58 url().spec().c_str(), 59 url().spec().c_str(),
60 request_handle.DebugString().c_str(),
59 save_info.file_path.value().c_str(), 61 save_info.file_path.value().c_str(),
60 received_bytes, 62 received_bytes,
61 total_bytes, 63 total_bytes,
62 prompt_user_for_save_location ? 'T' : 'F'); 64 prompt_user_for_save_location ? 'T' : 'F');
63 } 65 }
64 66
65 const GURL& DownloadCreateInfo::url() const { 67 const GURL& DownloadCreateInfo::url() const {
66 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); 68 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back();
67 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698