summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/resource_handler.h
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-14 05:24:21 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-14 05:24:21 +0000
commitc2c901bf406a50085002f8f1d6d63288d6e28c05 (patch)
tree7eb876216d6c541404fb73c3eaa32f387c8b9e6b /chrome/browser/renderer_host/resource_handler.h
parent684970b638fbfe1a2137fd162f630c86d2859828 (diff)
downloadchromium_src-c2c901bf406a50085002f8f1d6d63288d6e28c05.zip
chromium_src-c2c901bf406a50085002f8f1d6d63288d6e28c05.tar.gz
chromium_src-c2c901bf406a50085002f8f1d6d63288d6e28c05.tar.bz2
Ensure we don't load plugins on the IO thread.
I had to move the locks from PluginService to PluginList, so that a lock (which can block other threads) isn't held while loading the plugins. BUG=17938 TEST=added asserts which crash if plugins loaded on IO thread, current UI tests exercise them Review URL: http://codereview.chromium.org/164305 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23420 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_host/resource_handler.h')
-rw-r--r--chrome/browser/renderer_host/resource_handler.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/resource_handler.h b/chrome/browser/renderer_host/resource_handler.h
index 76851b6..39a85fa 100644
--- a/chrome/browser/renderer_host/resource_handler.h
+++ b/chrome/browser/renderer_host/resource_handler.h
@@ -52,7 +52,7 @@ struct ResourceResponse : public base::RefCounted<ResourceResponse> {
// The resource dispatcher host uses this interface to push load events to the
// renderer, allowing for differences in the types of IPC messages generated.
// See the implementations of this interface defined below.
-class ResourceHandler : public base::RefCounted<ResourceHandler> {
+class ResourceHandler : public base::RefCountedThreadSafe<ResourceHandler> {
public:
virtual ~ResourceHandler() {}
@@ -93,6 +93,10 @@ class ResourceHandler : public base::RefCounted<ResourceHandler> {
virtual bool OnResponseCompleted(int request_id,
const URLRequestStatus& status,
const std::string& security_info) = 0;
+
+ // Signals that the request is closed (i.e. finished successfully, cancelled).
+ // This is a signal that the associated URLRequest isn't valid anymore.
+ virtual void OnRequestClosed() { }
};
#endif // CHROME_BROWSER_RENDERER_HOST_RESOURCE_HANDLER_H_