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

Unified Diff: chrome/renderer/chrome_render_process_observer.cc

Issue 7058041: Remove ResourceDispatcherHost dependency on Chrome's LoginHandler and ExternalProtocolHandler. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix deps Created 9 years, 7 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
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.h ('k') | content/browser/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/chrome_render_process_observer.cc
===================================================================
--- chrome/renderer/chrome_render_process_observer.cc (revision 87739)
+++ chrome/renderer/chrome_render_process_observer.cc (working copy)
@@ -20,6 +20,7 @@
#include "chrome/renderer/content_settings_observer.h"
#include "chrome/renderer/security_filter_peer.h"
#include "content/common/resource_dispatcher.h"
+#include "content/common/resource_dispatcher_delegate.h"
#include "content/common/view_messages.h"
#include "content/renderer/render_thread.h"
#include "content/renderer/render_view.h"
@@ -53,9 +54,9 @@
static const unsigned int kCacheStatsDelayMS = 2000 /* milliseconds */;
-class RenderResourceObserver : public ResourceDispatcher::Observer {
+class RendererResourceDelegate : public ResourceDispatcherDelegate {
public:
- RenderResourceObserver()
+ RendererResourceDelegate()
: ALLOW_THIS_IN_INITIALIZER_LIST(method_factory_(this)) {
}
@@ -69,7 +70,7 @@
MessageLoop::current()->PostDelayedTask(
FROM_HERE,
method_factory_.NewRunnableMethod(
- &RenderResourceObserver::InformHostOfCacheStats),
+ &RendererResourceDelegate::InformHostOfCacheStats),
kCacheStatsDelayMS);
}
@@ -98,9 +99,9 @@
RenderThread::current()->Send(new ViewHostMsg_UpdatedCacheStats(stats));
}
- ScopedRunnableMethodFactory<RenderResourceObserver> method_factory_;
+ ScopedRunnableMethodFactory<RendererResourceDelegate> method_factory_;
- DISALLOW_COPY_AND_ASSIGN(RenderResourceObserver);
+ DISALLOW_COPY_AND_ASSIGN(RendererResourceDelegate);
};
class RenderViewContentSettingsSetter : public RenderViewVisitor {
@@ -310,7 +311,8 @@
}
RenderThread* thread = RenderThread::current();
- thread->resource_dispatcher()->set_observer(new RenderResourceObserver());
+ resource_delegate_.reset(new RendererResourceDelegate());
+ thread->resource_dispatcher()->set_delegate(resource_delegate_.get());
#if defined(OS_POSIX)
thread->AddFilter(new SuicideOnChannelErrorFilter());
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.h ('k') | content/browser/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698