summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 00:41:30 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-08 00:41:30 +0000
commit1e2917814446b821d4c326282d819ddd318ff175 (patch)
tree636cb3f1f97addf90ca31f90e9b5385fd9e3cba6 /remoting
parentf9e3c52fb5feba4c279dbbbec049aff0b45b3955 (diff)
downloadchromium_src-1e2917814446b821d4c326282d819ddd318ff175.zip
chromium_src-1e2917814446b821d4c326282d819ddd318ff175.tar.gz
chromium_src-1e2917814446b821d4c326282d819ddd318ff175.tar.bz2
Fix instances of passing raw pointers to RefCounted objects in tasks.
Some of these manually handled it correctly by using AddRef()/Release() pairs. I switched them to make_scoped_refptr() to be more consistent. This also makes them cleanup properly on MessageLoop shutdown if we start deleting tasks. BUG=28083 TEST=builds Review URL: http://codereview.chromium.org/3581008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61899 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting')
-rw-r--r--remoting/host/host_key_pair.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/remoting/host/host_key_pair.cc b/remoting/host/host_key_pair.cc
index f2ec6987..cabac20 100644
--- a/remoting/host/host_key_pair.cc
+++ b/remoting/host/host_key_pair.cc
@@ -55,7 +55,9 @@ void HostKeyPair::Save(MutableHostConfig* host_config) {
DCHECK(key_.get() != NULL);
host_config->Update(
- NewRunnableMethod(this, &HostKeyPair::DoSave, host_config));
+ NewRunnableMethod(this,
+ &HostKeyPair::DoSave,
+ make_scoped_refptr(host_config)));
}
void HostKeyPair::DoSave(MutableHostConfig* host_config) const {