summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/blocking_method_caller.cc
diff options
context:
space:
mode:
authoryuki@chromium.org <yuki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 09:46:24 +0000
committeryuki@chromium.org <yuki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-07 09:46:24 +0000
commit9b25d4557040da82c582d7dca22bc7a334a97f48 (patch)
tree4abc6ffa62f5cb58262d182843aade883eaed1e5 /chromeos/dbus/blocking_method_caller.cc
parentd43177fa5c889a451b6a033c970a7e25bcb6ad37 (diff)
downloadchromium_src-9b25d4557040da82c582d7dca22bc7a334a97f48.zip
chromium_src-9b25d4557040da82c582d7dca22bc7a334a97f48.tar.gz
chromium_src-9b25d4557040da82c582d7dca22bc7a334a97f48.tar.bz2
Code cleaning: Uses scoped_ptr<> to express ownership rather than writing ownership in comments.
Replaces Response* with scoped_ptr<Response> in dbus code and its related code. BUG=163231 TEST=no regression / no behavior changes Review URL: https://chromiumcodereview.appspot.com/12092061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chromeos/dbus/blocking_method_caller.cc')
-rw-r--r--chromeos/dbus/blocking_method_caller.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chromeos/dbus/blocking_method_caller.cc b/chromeos/dbus/blocking_method_caller.cc
index 91c796c..5fc0c9a 100644
--- a/chromeos/dbus/blocking_method_caller.cc
+++ b/chromeos/dbus/blocking_method_caller.cc
@@ -15,7 +15,7 @@ namespace {
// This function is a part of CallMethodAndBlock implementation.
void CallMethodAndBlockInternal(
- dbus::Response** response,
+ scoped_ptr<dbus::Response>* response,
base::ScopedClosureRunner* signaler,
dbus::ObjectProxy* proxy,
dbus::MethodCall* method_call) {
@@ -36,7 +36,7 @@ BlockingMethodCaller::BlockingMethodCaller(dbus::Bus* bus,
BlockingMethodCaller::~BlockingMethodCaller() {
}
-dbus::Response* BlockingMethodCaller::CallMethodAndBlock(
+scoped_ptr<dbus::Response> BlockingMethodCaller::CallMethodAndBlock(
dbus::MethodCall* method_call) {
// on_blocking_method_call_->Signal() will be called when |signaler| is
// destroyed.
@@ -46,7 +46,7 @@ dbus::Response* BlockingMethodCaller::CallMethodAndBlock(
base::ScopedClosureRunner* signaler =
new base::ScopedClosureRunner(signal_task);
- dbus::Response* response = NULL;
+ scoped_ptr<dbus::Response> response;
bus_->PostTaskToDBusThread(
FROM_HERE,
base::Bind(&CallMethodAndBlockInternal,
@@ -57,7 +57,7 @@ dbus::Response* BlockingMethodCaller::CallMethodAndBlock(
// http://crbug.com/125360
base::ThreadRestrictions::ScopedAllowWait allow_wait;
on_blocking_method_call_.Wait();
- return response;
+ return response.Pass();
}
} // namespace chromeos