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

Side by Side Diff: content/browser/download/download_request_handle.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_request_handle.h" 5 #include "content/browser/download/download_request_handle.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "content/browser/renderer_host/render_view_host_impl.h" 9 #include "content/browser/renderer_host/render_view_host_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 BrowserThread::IO, FROM_HERE, 71 BrowserThread::IO, FROM_HERE,
72 base::Bind(&DownloadResourceHandler::ResumeRequest, handler_)); 72 base::Bind(&DownloadResourceHandler::ResumeRequest, handler_));
73 } 73 }
74 74
75 void DownloadRequestHandle::CancelRequest() const { 75 void DownloadRequestHandle::CancelRequest() const {
76 BrowserThread::PostTask( 76 BrowserThread::PostTask(
77 BrowserThread::IO, FROM_HERE, 77 BrowserThread::IO, FROM_HERE,
78 base::Bind(&DownloadResourceHandler::CancelRequest, handler_)); 78 base::Bind(&DownloadResourceHandler::CancelRequest, handler_));
79 } 79 }
80 80
81 void DownloadRequestHandle::SetRequestId(int new_request_id) {
82 request_id_ = new_request_id;
83 }
84
85 int DownloadRequestHandle::RequestId() const {
86 return request_id_;
87 }
88
81 std::string DownloadRequestHandle::DebugString() const { 89 std::string DownloadRequestHandle::DebugString() const {
82 return base::StringPrintf("{" 90 return base::StringPrintf("{"
83 " child_id = %d" 91 " child_id = %d"
84 " render_view_id = %d" 92 " render_view_id = %d"
85 " request_id = %d" 93 " request_id = %d"
86 "}", 94 "}",
87 child_id_, 95 child_id_,
88 render_view_id_, 96 render_view_id_,
89 request_id_); 97 request_id_);
90 } 98 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698