Commit 634e197b authored by Robert Liao's avatar Robert Liao Committed by Commit Bot

Convert Media Uses of base::RepeatingCallback<>::Equals to Use == or !=

BUG=937566

Change-Id: If1690d8cfd44b7d92be877f8d596510a78e78497
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1644156Reviewed-by: default avatarChrome Cunningham <chcunningham@chromium.org>
Commit-Queue: Robert Liao <robliao@chromium.org>
Auto-Submit: Robert Liao <robliao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#666358}
parent ad5b98e8
...@@ -454,8 +454,8 @@ TEST_F(PresentationServiceDelegateImplTest, ListenForConnnectionStateChange) { ...@@ -454,8 +454,8 @@ TEST_F(PresentationServiceDelegateImplTest, ListenForConnnectionStateChange) {
mock_callback; mock_callback;
auto callback = mock_callback.Get(); auto callback = mock_callback.Get();
PresentationInfo connection(presentation_url1_, kPresentationId); PresentationInfo connection(presentation_url1_, kPresentationId);
EXPECT_CALL(*router_, OnAddPresentationConnectionStateChangedCallbackInvoked( EXPECT_CALL(*router_,
Equals(callback))); OnAddPresentationConnectionStateChangedCallbackInvoked(callback));
delegate_impl_->ListenForConnectionStateChange( delegate_impl_->ListenForConnectionStateChange(
main_frame_process_id_, main_frame_routing_id_, connection, callback); main_frame_process_id_, main_frame_routing_id_, connection, callback);
} }
......
...@@ -33,12 +33,6 @@ ...@@ -33,12 +33,6 @@
namespace media_router { namespace media_router {
// Matcher for objects that uses Equals() member function for equality check.
// Use only for comparing base::MockCallback.
MATCHER_P(Equals, other, "") {
return arg.Equals(other);
}
// Matcher for IssueInfo title. // Matcher for IssueInfo title.
MATCHER_P(IssueTitleEquals, title, "") { MATCHER_P(IssueTitleEquals, title, "") {
return arg.info().title == title; return arg.info().title == title;
......
...@@ -230,7 +230,7 @@ void WebRtcLoggingHandlerHost::StartRtpDump( ...@@ -230,7 +230,7 @@ void WebRtcLoggingHandlerHost::StartRtpDump(
stop_callback) { stop_callback) {
DCHECK_CURRENTLY_ON(BrowserThread::IO); DCHECK_CURRENTLY_ON(BrowserThread::IO);
DCHECK(stop_rtp_dump_callback_.is_null() || DCHECK(stop_rtp_dump_callback_.is_null() ||
stop_rtp_dump_callback_.Equals(stop_callback)); stop_rtp_dump_callback_ == stop_callback);
stop_rtp_dump_callback_ = stop_callback; stop_rtp_dump_callback_ = stop_callback;
......
...@@ -669,7 +669,7 @@ void MediaInternals::AddUpdateCallback(const UpdateCallback& callback) { ...@@ -669,7 +669,7 @@ void MediaInternals::AddUpdateCallback(const UpdateCallback& callback) {
void MediaInternals::RemoveUpdateCallback(const UpdateCallback& callback) { void MediaInternals::RemoveUpdateCallback(const UpdateCallback& callback) {
DCHECK_CURRENTLY_ON(BrowserThread::UI); DCHECK_CURRENTLY_ON(BrowserThread::UI);
for (size_t i = 0; i < update_callbacks_.size(); ++i) { for (size_t i = 0; i < update_callbacks_.size(); ++i) {
if (update_callbacks_[i].Equals(callback)) { if (update_callbacks_[i] == callback) {
update_callbacks_.erase(update_callbacks_.begin() + i); update_callbacks_.erase(update_callbacks_.begin() + i);
break; break;
} }
......
...@@ -232,7 +232,7 @@ AUAudioInputStream::AUAudioInputStream( ...@@ -232,7 +232,7 @@ AUAudioInputStream::AUAudioInputStream(
glitches_detected_(0), glitches_detected_(0),
log_callback_(log_callback) { log_callback_(log_callback) {
DCHECK(manager_); DCHECK(manager_);
CHECK(!log_callback_.Equals(AudioManager::LogCallback())); CHECK(log_callback_ != AudioManager::LogCallback());
if (use_voice_processing_) { if (use_voice_processing_) {
DCHECK(input_params.channels() == 1 || input_params.channels() == 2); DCHECK(input_params.channels() == 1 || input_params.channels() == 2);
const bool got_default_device = const bool got_default_device =
......
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