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

Unified Diff: chrome/common/service_process_util_mac.mm

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 | « base/memory/scoped_ptr_unittest.nc ('k') | ppapi/proxy/ppb_network_monitor_private_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/service_process_util_mac.mm
diff --git a/chrome/common/service_process_util_mac.mm b/chrome/common/service_process_util_mac.mm
index 7ea79261c0df8acc4d95d5dc9047c9a13764aed3..4100bcb0671fd2b635a3fb57edcb32b23bf5c237 100644
--- a/chrome/common/service_process_util_mac.mm
+++ b/chrome/common/service_process_util_mac.mm
@@ -319,13 +319,13 @@ bool ServiceProcessState::StateData::WatchExecutable() {
}
FilePath executable_path = FilePath([exe_path fileSystemRepresentation]);
- scoped_ptr<ExecFilePathWatcherDelegate> delegate(
+ scoped_refptr<ExecFilePathWatcherDelegate> delegate(
new ExecFilePathWatcherDelegate);
if (!delegate->Init(executable_path)) {
DLOG(ERROR) << "executable_watcher_.Init " << executable_path.value();
return false;
}
- if (!executable_watcher_.Watch(executable_path, delegate.release())) {
+ if (!executable_watcher_.Watch(executable_path, delegate)) {
DLOG(ERROR) << "executable_watcher_.watch " << executable_path.value();
return false;
}
« no previous file with comments | « base/memory/scoped_ptr_unittest.nc ('k') | ppapi/proxy/ppb_network_monitor_private_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698