Merge "binderwrapper: Resolve ambiguous base::Closure reference"

This commit is contained in:
Treehugger Robot 2016-04-12 21:48:45 +00:00 committed by Gerrit Code Review
commit 979ce0e338
5 changed files with 8 additions and 8 deletions

View file

@ -70,7 +70,7 @@ class BinderWrapper {
// is currently registered for |binder|, it will be replaced. // is currently registered for |binder|, it will be replaced.
virtual bool RegisterForDeathNotifications( virtual bool RegisterForDeathNotifications(
const sp<IBinder>& binder, const sp<IBinder>& binder,
const base::Closure& callback) = 0; const ::base::Closure& callback) = 0;
// Unregisters the callback, if any, for |binder|. // Unregisters the callback, if any, for |binder|.
virtual bool UnregisterForDeathNotifications(const sp<IBinder>& binder) = 0; virtual bool UnregisterForDeathNotifications(const sp<IBinder>& binder) = 0;

View file

@ -98,7 +98,7 @@ class StubBinderWrapper : public BinderWrapper {
const sp<IBinder>& binder) override; const sp<IBinder>& binder) override;
sp<BBinder> CreateLocalBinder() override; sp<BBinder> CreateLocalBinder() override;
bool RegisterForDeathNotifications(const sp<IBinder>& binder, bool RegisterForDeathNotifications(const sp<IBinder>& binder,
const base::Closure& callback) override; const ::base::Closure& callback) override;
bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override; bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override;
uid_t GetCallingUid() override; uid_t GetCallingUid() override;
pid_t GetCallingPid() override; pid_t GetCallingPid() override;
@ -119,7 +119,7 @@ class StubBinderWrapper : public BinderWrapper {
// Map from binder handle to the callback that should be invoked on binder // Map from binder handle to the callback that should be invoked on binder
// death. // death.
std::map<sp<IBinder>, base::Closure> death_callbacks_; std::map<sp<IBinder>, ::base::Closure> death_callbacks_;
// Values to return from GetCallingUid() and GetCallingPid(); // Values to return from GetCallingUid() and GetCallingPid();
uid_t calling_uid_; uid_t calling_uid_;

View file

@ -29,7 +29,7 @@ namespace android {
// be awkward. // be awkward.
class RealBinderWrapper::DeathRecipient : public IBinder::DeathRecipient { class RealBinderWrapper::DeathRecipient : public IBinder::DeathRecipient {
public: public:
explicit DeathRecipient(const base::Closure& callback) explicit DeathRecipient(const ::base::Closure& callback)
: callback_(callback) {} : callback_(callback) {}
~DeathRecipient() = default; ~DeathRecipient() = default;
@ -40,7 +40,7 @@ class RealBinderWrapper::DeathRecipient : public IBinder::DeathRecipient {
private: private:
// Callback to run in response to binder death. // Callback to run in response to binder death.
base::Closure callback_; ::base::Closure callback_;
DISALLOW_COPY_AND_ASSIGN(DeathRecipient); DISALLOW_COPY_AND_ASSIGN(DeathRecipient);
}; };
@ -85,7 +85,7 @@ sp<BBinder> RealBinderWrapper::CreateLocalBinder() {
bool RealBinderWrapper::RegisterForDeathNotifications( bool RealBinderWrapper::RegisterForDeathNotifications(
const sp<IBinder>& binder, const sp<IBinder>& binder,
const base::Closure& callback) { const ::base::Closure& callback) {
sp<DeathRecipient> recipient(new DeathRecipient(callback)); sp<DeathRecipient> recipient(new DeathRecipient(callback));
if (binder->linkToDeath(recipient) != OK) { if (binder->linkToDeath(recipient) != OK) {
LOG(ERROR) << "Failed to register for death notifications on " LOG(ERROR) << "Failed to register for death notifications on "

View file

@ -36,7 +36,7 @@ class RealBinderWrapper : public BinderWrapper {
const sp<IBinder>& binder) override; const sp<IBinder>& binder) override;
sp<BBinder> CreateLocalBinder() override; sp<BBinder> CreateLocalBinder() override;
bool RegisterForDeathNotifications(const sp<IBinder>& binder, bool RegisterForDeathNotifications(const sp<IBinder>& binder,
const base::Closure& callback) override; const ::base::Closure& callback) override;
bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override; bool UnregisterForDeathNotifications(const sp<IBinder>& binder) override;
uid_t GetCallingUid() override; uid_t GetCallingUid() override;
pid_t GetCallingPid() override; pid_t GetCallingPid() override;

View file

@ -64,7 +64,7 @@ sp<BBinder> StubBinderWrapper::CreateLocalBinder() {
bool StubBinderWrapper::RegisterForDeathNotifications( bool StubBinderWrapper::RegisterForDeathNotifications(
const sp<IBinder>& binder, const sp<IBinder>& binder,
const base::Closure& callback) { const ::base::Closure& callback) {
death_callbacks_[binder] = callback; death_callbacks_[binder] = callback;
return true; return true;
} }