Commit 7b911c42 authored by Jan Wilken Dörrie's avatar Jan Wilken Dörrie Committed by Commit Bot

[base] Replace Contains{Key,Value} with Contains in //mojo

This change replaces usages of base::ContainsKey() and base::ContainsValue()
with base::Contains() in //mojo.

Reproduction:
 - sed -i 's/\bbase::ContainsKey\b/base::Contains/g'
 - sed -i 's/\bbase::ContainsValue\b/base::Contains/g'
 - git cl format

This CL was uploaded by git cl split.

R=sky@chromium.org

Bug: 970209
Change-Id: I39d1a7752172f4fd9493eb63cef0d8a93a07e550
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1648343
Auto-Submit: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#667067}
parent 9ca45153
......@@ -299,7 +299,7 @@ bool InterfaceEndpointClient::AcceptWithResponder(
controller_->SyncWatch(&response_received);
// Make sure that this instance hasn't been destroyed.
if (weak_self) {
DCHECK(base::ContainsKey(sync_responses_, request_id));
DCHECK(base::Contains(sync_responses_, request_id));
auto iter = sync_responses_.find(request_id);
DCHECK_EQ(&response_received, iter->second->response_received);
if (response_received) {
......
......@@ -386,7 +386,7 @@ InterfaceId MultiplexRouter::AssociateInterface(
id = next_interface_id_value_++;
if (set_interface_id_namespace_bit_)
id |= kInterfaceIdNamespaceMask;
} while (base::ContainsKey(endpoints_, id));
} while (base::Contains(endpoints_, id));
InterfaceEndpoint* endpoint = new InterfaceEndpoint(this, id);
endpoints_[id] = endpoint;
......@@ -438,7 +438,7 @@ void MultiplexRouter::CloseEndpointHandle(
return;
MayAutoLock locker(&lock_);
DCHECK(base::ContainsKey(endpoints_, id));
DCHECK(base::Contains(endpoints_, id));
InterfaceEndpoint* endpoint = endpoints_[id].get();
DCHECK(!endpoint->client());
DCHECK(!endpoint->closed());
......@@ -462,7 +462,7 @@ InterfaceEndpointController* MultiplexRouter::AttachEndpointClient(
DCHECK(client);
MayAutoLock locker(&lock_);
DCHECK(base::ContainsKey(endpoints_, id));
DCHECK(base::Contains(endpoints_, id));
InterfaceEndpoint* endpoint = endpoints_[id].get();
endpoint->AttachClient(client, std::move(runner));
......@@ -481,7 +481,7 @@ void MultiplexRouter::DetachEndpointClient(
DCHECK(IsValidInterfaceId(id));
MayAutoLock locker(&lock_);
DCHECK(base::ContainsKey(endpoints_, id));
DCHECK(base::Contains(endpoints_, id));
InterfaceEndpoint* endpoint = endpoints_[id].get();
endpoint->DetachClient();
......@@ -549,7 +549,7 @@ bool MultiplexRouter::HasAssociatedEndpoints() const {
if (endpoints_.size() == 0)
return false;
return !base::ContainsKey(endpoints_, kMasterInterfaceId);
return !base::Contains(endpoints_, kMasterInterfaceId);
}
void MultiplexRouter::EnableBatchDispatch() {
......
......@@ -36,7 +36,7 @@ bool SyncHandleRegistry::RegisterHandle(const Handle& handle,
const HandleCallback& callback) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (base::ContainsKey(handles_, handle))
if (base::Contains(handles_, handle))
return false;
MojoResult result = wait_set_.AddHandle(handle, handle_signals);
......@@ -49,7 +49,7 @@ bool SyncHandleRegistry::RegisterHandle(const Handle& handle,
void SyncHandleRegistry::UnregisterHandle(const Handle& handle) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (!base::ContainsKey(handles_, handle))
if (!base::Contains(handles_, handle))
return;
MojoResult result = wait_set_.RemoveHandle(handle);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment