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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_impl.h

Issue 10825073: Stop using ScopedAllowIO in content::ResourceDispatcherHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move abort check back to BeginRequest() Created 8 years, 5 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/renderer_host/resource_dispatcher_host_impl.h
diff --git a/content/browser/renderer_host/resource_dispatcher_host_impl.h b/content/browser/renderer_host/resource_dispatcher_host_impl.h
index 83fe21de76db16fb13bff7e5497a5060b719419f..cd7533fb62805be7b27b3e744c8f49cd02b1a3f2 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_impl.h
+++ b/content/browser/renderer_host/resource_dispatcher_host_impl.h
@@ -62,8 +62,7 @@ struct Referrer;
class CONTENT_EXPORT ResourceDispatcherHostImpl
: public ResourceDispatcherHost,
- public ResourceLoaderDelegate,
- public base::SupportsWeakPtr<ResourceDispatcherHostImpl> {
+ public ResourceLoaderDelegate {
public:
ResourceDispatcherHostImpl();
virtual ~ResourceDispatcherHostImpl();
@@ -300,10 +299,19 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
void OnSyncLoad(int request_id,
const ResourceHostMsg_Request& request_data,
IPC::Message* sync_result);
- void BeginRequest(int request_id,
+ // If request_data comes with upload data, gets the content length and passes
+ // it to BeginRequest(). Otherwise, calls BeginRequest() directly.
+ void PrepareToBeginRequest(
+ int request_id,
+ const ResourceHostMsg_Request& request_data,
+ IPC::Message* sync_result,
+ int route_id);
+ void BeginRequest(scoped_refptr<ResourceMessageFilter> filter,
+ int request_id,
const ResourceHostMsg_Request& request_data,
IPC::Message* sync_result, // only valid for sync
- int route_id); // only valid for async
+ int route_id, // only valid for async
+ uint64 upload_size);
void OnDataReceivedACK(int request_id);
void OnDataDownloadedACK(int request_id);
void OnUploadProgressACK(int request_id);
@@ -412,6 +420,9 @@ class CONTENT_EXPORT ResourceDispatcherHostImpl
// shutdown.
std::set<const ResourceContext*> active_resource_contexts_;
+ // WeakPtrFactory to be used on IO thread.
+ base::WeakPtrFactory<ResourceDispatcherHostImpl> weak_ptr_factory_;
+
DISALLOW_COPY_AND_ASSIGN(ResourceDispatcherHostImpl);
};

Powered by Google App Engine
This is Rietveld 408576698