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

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: 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 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 7672d874113d72c905bfdd106098ef8310c33169..0d570da906f9278b61a3a24589796f3d72082cbf 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -76,6 +76,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"
@@ -519,6 +521,7 @@ bool RenderProcessHostImpl::Init() {
void RenderProcessHostImpl::CreateMessageFilters() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+ channel_->AddFilter(new ResourceSchedulerFilter(GetID()));
MediaObserver* media_observer =
GetContentClient()->browser()->GetMediaObserver();
scoped_refptr<RenderMessageFilter> render_message_filter(
@@ -1450,6 +1453,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