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

Unified Diff: chrome/browser/renderer_host/safe_browsing_resource_handler.h

Issue 63036: Fix a crash where the ResourceMessageFilter is deleted (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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: chrome/browser/renderer_host/safe_browsing_resource_handler.h
===================================================================
--- chrome/browser/renderer_host/safe_browsing_resource_handler.h (revision 13541)
+++ chrome/browser/renderer_host/safe_browsing_resource_handler.h (working copy)
@@ -8,14 +8,15 @@
#include <string>
#include "base/time.h"
+#include "chrome/browser/renderer_host/resource_dispatcher_host.h"
#include "chrome/browser/renderer_host/resource_handler.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
+#include "chrome/common/notification_observer.h"
-class ResourceDispatcherHost;
-
// Checks that a url is safe.
class SafeBrowsingResourceHandler : public ResourceHandler,
- public SafeBrowsingService::Client {
+ public SafeBrowsingService::Client,
+ public NotificationObserver {
public:
SafeBrowsingResourceHandler(ResourceHandler* handler,
int render_process_host_id,
@@ -23,7 +24,8 @@
const GURL& url,
ResourceType::Type resource_type,
SafeBrowsingService* safe_browsing,
- ResourceDispatcherHost* resource_dispatcher_host);
+ ResourceDispatcherHost* resource_dispatcher_host,
+ ResourceDispatcherHost::Receiver* receiver);
~SafeBrowsingResourceHandler();
// ResourceHandler implementation:
@@ -47,6 +49,11 @@
// the user has decided to proceed with the current request, or go back.
void OnBlockingPageComplete(bool proceed);
+ // NotificationObserver interface.
+ void Observe(NotificationType type,
+ const NotificationSource& source,
+ const NotificationDetails& details);
+
private:
scoped_refptr<ResourceHandler> next_handler_;
int render_process_host_id_;
@@ -62,6 +69,7 @@
ResourceDispatcherHost* rdh_;
base::Time pause_time_;
ResourceType::Type resource_type_;
+ ResourceDispatcherHost::Receiver* receiver_;
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingResourceHandler);
};

Powered by Google App Engine
This is Rietveld 408576698