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

Unified Diff: webkit/plugins/npapi/plugin_stream_url.cc

Issue 10066044: RefCounted types should not have public destructors, webkit/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Implementation ordering Created 8 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
« no previous file with comments | « webkit/plugins/npapi/plugin_stream_url.h ('k') | webkit/quota/mock_quota_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
}
« no previous file with comments | « webkit/plugins/npapi/plugin_stream_url.h ('k') | webkit/quota/mock_quota_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698