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

Unified Diff: ppapi/proxy/ppb_network_monitor_private_proxy.cc

Issue 9958150: Make sure that scoped_ptr<> cannot be used with ref-counted objects. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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/common/service_process_util_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/ppb_network_monitor_private_proxy.cc
diff --git a/ppapi/proxy/ppb_network_monitor_private_proxy.cc b/ppapi/proxy/ppb_network_monitor_private_proxy.cc
index 4fa2d6eec240fd16cd8c7ff12e8cbd5d5cd5a93c..26252acd27e4fff13c4b9a3f3dd2500222c923b3 100644
--- a/ppapi/proxy/ppb_network_monitor_private_proxy.cc
+++ b/ppapi/proxy/ppb_network_monitor_private_proxy.cc
@@ -82,7 +82,7 @@ PP_Resource PPB_NetworkMonitor_Private_Proxy::CreateProxyResource(
if (!proxy)
return 0;
- scoped_ptr<NetworkMonitor> result(
+ scoped_refptr<NetworkMonitor> result(
new NetworkMonitor(instance, proxy, callback, user_data));
proxy->monitors_->AddObserver(result.get());
@@ -103,7 +103,7 @@ PP_Resource PPB_NetworkMonitor_Private_Proxy::CreateProxyResource(
result->AsWeakPtr(), proxy->current_list_));
}
- return result.release()->GetReference();
+ return result->GetReference();
}
bool PPB_NetworkMonitor_Private_Proxy::OnMessageReceived(
« no previous file with comments | « chrome/common/service_process_util_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698