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

Unified Diff: content/browser/download/download_request_handle.h

Issue 10332130: Use defer out-params instead of ResourceDispatcherHostImpl::PauseRequest(...true) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/download/download_request_handle.h
===================================================================
--- content/browser/download/download_request_handle.h (revision 136397)
+++ content/browser/download/download_request_handle.h (working copy)
@@ -9,6 +9,8 @@
#include <string>
#include "base/compiler_specific.h"
+#include "base/memory/ref_counted.h"
+#include "content/browser/download/download_resource_handler.h"
#include "content/common/content_export.h"
namespace content {
@@ -45,6 +47,8 @@
class CONTENT_EXPORT DownloadRequestHandle
: public DownloadRequestHandleInterface {
public:
+ virtual ~DownloadRequestHandle();
+
// Create a null DownloadRequestHandle: getters will return null, and
// all actions are no-ops.
// TODO(rdsmith): Ideally, actions would be forbidden rather than
@@ -55,7 +59,8 @@
DownloadRequestHandle();
// Note that |rdh| is required to be non-null.
- DownloadRequestHandle(int child_id,
+ DownloadRequestHandle(DownloadResourceHandler* handler,
+ int child_id,
int render_view_id,
int request_id);
@@ -68,6 +73,8 @@
virtual std::string DebugString() const OVERRIDE;
private:
+ scoped_refptr<DownloadResourceHandler> handler_;
Randy Smith (Not in Mondays) 2012/05/17 15:53:48 Shouldn't this be a weak pointer? I could easily
darin (slow to review) 2012/05/17 21:17:57 It seems OK to extend the lifetime of the Handler.
+
// The ID of the child process that started the download.
int child_id_;

Powered by Google App Engine
This is Rietveld 408576698