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

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: Manage ownership with handles Created 8 years, 1 month 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 4a0bd34f99e30cd2b2d873072a19543409b734cc..8d20f55b03f7fcf51371f383b5d5540f48b7c58c 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(
@@ -1469,6 +1472,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