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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 11270027: Add a ResourceScheduler to ResourceDispatcherHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Almost no linked_ptrs Created 8 years 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/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 1b610a259edac5a9f2708f3ca05886726453ce95..c88b53d164c68ce40df10076b344a61d0bd21172 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -77,6 +77,8 @@
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/renderer_host/render_widget_helper.h"
#include "content/browser/renderer_host/resource_message_filter.h"
+#include "content/browser/renderer_host/resource_scheduler.h"
+#include "content/browser/renderer_host/resource_scheduler_filter.h"
#include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
#include "content/browser/renderer_host/text_input_client_message_filter.h"
#include "content/browser/resolve_proxy_msg_helper.h"
@@ -485,6 +487,7 @@ bool RenderProcessHostImpl::Init() {
void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ channel_->AddFilter(new ResourceSchedulerFilter(GetID()));
MediaObserver* media_observer =
GetContentClient()->browser()->GetMediaObserver();
// Add BrowserPluginMessageFilter to ensure it gets the first stab at messages
@@ -1449,6 +1452,8 @@ void RenderProcessHostImpl::ProcessDied() {
ViewHostMsg_RenderViewGone(iter.GetCurrentKey(),
static_cast<int>(status),
exit_code));
+ ResourceDispatcherHostImpl::Get()->scheduler()->OnDestroy(
+ GetID(), iter.GetCurrentKey());
iter.Advance();
}

Powered by Google App Engine
This is Rietveld 408576698