| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chromeos/dbus/blocking_method_caller.h" | 5 #include "chromeos/dbus/blocking_method_caller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
| 9 #include "base/location.h" | 9 #include "base/location.h" |
| 10 #include "base/task_runner.h" | 10 #include "base/task_runner.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 bus_->GetDBusTaskRunner()->PostTask( | 53 bus_->GetDBusTaskRunner()->PostTask( |
| 54 FROM_HERE, | 54 FROM_HERE, |
| 55 base::Bind(&CallMethodAndBlockInternal, | 55 base::Bind(&CallMethodAndBlockInternal, |
| 56 &response, | 56 &response, |
| 57 base::Owned(signaler), | 57 base::Owned(signaler), |
| 58 base::Unretained(proxy_), | 58 base::Unretained(proxy_), |
| 59 method_call)); | 59 method_call)); |
| 60 // http://crbug.com/125360 | 60 // http://crbug.com/125360 |
| 61 base::ThreadRestrictions::ScopedAllowWait allow_wait; | 61 base::ThreadRestrictions::ScopedAllowWait allow_wait; |
| 62 on_blocking_method_call_.Wait(); | 62 on_blocking_method_call_.Wait(); |
| 63 return response.Pass(); | 63 return response; |
| 64 } | 64 } |
| 65 | 65 |
| 66 } // namespace chromeos | 66 } // namespace chromeos |
| OLD | NEW |