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

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

Issue 9150016: Move creation and ownership of ResourceDispatcherHost and PluginService to content. This gives a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix chromeos ui_tests Created 8 years, 11 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.h
===================================================================
--- content/browser/renderer_host/resource_dispatcher_host.h (revision 117096)
+++ content/browser/renderer_host/resource_dispatcher_host.h (working copy)
@@ -59,16 +59,21 @@
class CONTENT_EXPORT ResourceDispatcherHost : public net::URLRequest::Delegate {
public:
- explicit ResourceDispatcherHost(
- const ResourceQueue::DelegateSet& resource_queue_delegates);
+ ResourceDispatcherHost();
virtual ~ResourceDispatcherHost();
- void Initialize();
+ // Returns the current ResourceDispatcherHost. May return NULL if it hasn't
+ // been created yet.
+ static ResourceDispatcherHost* Get();
// Puts the resource dispatcher host in an inactive state (unable to begin
// new requests). Cancels all pending requests.
void Shutdown();
+ // Adds a delegate that can delay requests. This should be called early, i.e.
+ // in the ContentBrowserClient::ResourceDispatcherHostCreated callback.
+ void AddResourceQueueDelegate(ResourceQueueDelegate* delegate);
+
// Returns true if the message was a resource message that was processed.
// If it was, message_was_ok will be false iff the message was corrupt.
bool OnMessageReceived(const IPC::Message& message,
@@ -462,6 +467,9 @@
// Handles the resource requests from the moment we want to start them.
ResourceQueue resource_queue_;
+ // Used temporarily during construction.
+ ResourceQueue::DelegateSet* temporarily_delegate_set_;
+
// We own the download file writing thread and manager
scoped_refptr<DownloadFileManager> download_file_manager_;

Powered by Google App Engine
This is Rietveld 408576698