Index: webkit/plugins/npapi/plugin_stream_url.cc |
diff --git a/webkit/plugins/npapi/plugin_stream_url.cc b/webkit/plugins/npapi/plugin_stream_url.cc |
index b7efcdfbb982817ff034a3b34c8c68f8b12e1bd2..8364f6ec07e4cc5e1d107d72c7dd0a03c23799bb 100644 |
--- a/webkit/plugins/npapi/plugin_stream_url.cc |
+++ b/webkit/plugins/npapi/plugin_stream_url.cc |
@@ -24,12 +24,6 @@ PluginStreamUrl::PluginStreamUrl( |
id_(resource_id) { |
} |
-PluginStreamUrl::~PluginStreamUrl() { |
- if (instance() && instance()->webplugin()) { |
- instance()->webplugin()->ResourceClientDeleted(AsResourceClient()); |
- } |
-} |
- |
bool PluginStreamUrl::Close(NPReason reason) { |
// Protect the stream against it being destroyed or the whole plugin instance |
// being destroyed within the destroy stream handler. |
@@ -44,6 +38,15 @@ WebPluginResourceClient* PluginStreamUrl::AsResourceClient() { |
return static_cast<WebPluginResourceClient*>(this); |
} |
+void PluginStreamUrl::CancelRequest() { |
+ if (id_ > 0) { |
+ if (instance()->webplugin()) { |
+ instance()->webplugin()->CancelResource(id_); |
+ } |
+ id_ = 0; |
+ } |
+} |
+ |
void PluginStreamUrl::WillSendRequest(const GURL& url, int http_status_code) { |
if (notify_needed()) { |
// If the plugin participates in HTTP url redirect handling then notify it. |
@@ -119,12 +122,9 @@ int PluginStreamUrl::ResourceId() { |
return id_; |
} |
-void PluginStreamUrl::CancelRequest() { |
- if (id_ > 0) { |
- if (instance()->webplugin()) { |
- instance()->webplugin()->CancelResource(id_); |
- } |
- id_ = 0; |
+PluginStreamUrl::~PluginStreamUrl() { |
+ if (instance() && instance()->webplugin()) { |
+ instance()->webplugin()->ResourceClientDeleted(AsResourceClient()); |
} |
} |