Commit ad5e9b4d authored by Alex Turner's avatar Alex Turner Committed by Commit Bot

Migrate chrome/services from base::Bind and ::Callback to Once/Repeating

base::Bind and base::Callback are deprecated and should be replaced with
the more explicit base::Bind{Once,Repeating} and
base::{Once,Repeating}Callback.

Bug: 1141533, 1007642
Change-Id: Iae0a64868e4e63743cf5743b1c1f897260059078
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2492561Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarBecca Hughes <beccahughes@chromium.org>
Commit-Queue: Alex Turner <alexmt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#820259}
parent 5ff062f5
......@@ -370,7 +370,6 @@ _NOT_CONVERTED_TO_MODERN_BIND_AND_CALLBACK = '|'.join((
'^chrome/browser/ui/',
'^chrome/browser/web_applications/',
'^chrome/browser/win/',
'^chrome/services/',
'^chrome/test/chromedriver/server/http_handler.cc',
'^chrome/tools/',
'^chromeos/attestation/',
......
......@@ -137,9 +137,9 @@ CloudSpeechRecognitionClientUnitTest::CloudSpeechRecognitionClientUnitTest() =
void CloudSpeechRecognitionClientUnitTest::SetUp() {
client_under_test_ = std::make_unique<CloudSpeechRecognitionClient>(
media::BindToCurrentLoop(
base::Bind(&CloudSpeechRecognitionClientUnitTest::OnRecognitionEvent,
base::Unretained(this))),
media::BindToCurrentLoop(base::BindRepeating(
&CloudSpeechRecognitionClientUnitTest::OnRecognitionEvent,
base::Unretained(this))),
nullptr);
speech_recognition_service_impl_ =
......
......@@ -80,8 +80,8 @@ SpeechRecognitionRecognizerImpl::SpeechRecognitionRecognizerImpl(
const base::FilePath& config_path)
: client_remote_(std::move(remote)), config_path_(config_path) {
recognition_event_callback_ = media::BindToCurrentLoop(
base::Bind(&SpeechRecognitionRecognizerImpl::OnRecognitionEvent,
weak_factory_.GetWeakPtr()));
base::BindRepeating(&SpeechRecognitionRecognizerImpl::OnRecognitionEvent,
weak_factory_.GetWeakPtr()));
enable_soda_ = base::FeatureList::IsEnabled(media::kUseSodaForLiveCaption);
if (enable_soda_) {
DCHECK(base::PathExists(binary_path));
......
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