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

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

Issue 7112011: Change DownloadProcessHandle to be more of an encapsulated class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged to LKGR. Created 9 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/download/download_create_info.h ('k') | chrome/browser/download/download_file.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 DownloadCreateInfo::~DownloadCreateInfo() { 46 DownloadCreateInfo::~DownloadCreateInfo() {
47 } 47 }
48 48
49 std::string DownloadCreateInfo::DebugString() const { 49 std::string DownloadCreateInfo::DebugString() const {
50 return base::StringPrintf("{" 50 return base::StringPrintf("{"
51 " download_id = %d" 51 " download_id = %d"
52 " url = \"%s\"" 52 " url = \"%s\""
53 " path = \"%" PRFilePath "\"" 53 " path = \"%" PRFilePath "\""
54 " received_bytes = %" PRId64 54 " received_bytes = %" PRId64
55 " total_bytes = %" PRId64 55 " total_bytes = %" PRId64
56 " child_id = %d" 56 " request_handle = %s"
57 " render_view_id = %d"
58 " request_id = %d"
59 " prompt_user_for_save_location = %c" 57 " prompt_user_for_save_location = %c"
60 " }", 58 " }",
61 download_id, 59 download_id,
62 url().spec().c_str(), 60 url().spec().c_str(),
63 path.value().c_str(), 61 path.value().c_str(),
64 received_bytes, 62 received_bytes,
65 total_bytes, 63 total_bytes,
66 process_handle.child_id(), 64 request_handle.DebugString().c_str(),
67 process_handle.render_view_id(),
68 process_handle.request_id(),
69 prompt_user_for_save_location ? 'T' : 'F'); 65 prompt_user_for_save_location ? 'T' : 'F');
70 } 66 }
71 67
72 const GURL& DownloadCreateInfo::url() const { 68 const GURL& DownloadCreateInfo::url() const {
73 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back(); 69 return url_chain.empty() ? GURL::EmptyGURL() : url_chain.back();
74 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_create_info.h ('k') | chrome/browser/download/download_file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698