Skip to content

Commit

Permalink
Code health: port away from deprecated DictionaryValue::HasKey in /re…
Browse files Browse the repository at this point in the history
…moting/host

This is a portion for /remoting/host.
(And in some cases also adjust away from other deprecated Value APIs,
 when convenient/nearby)

This CL was uploaded by git cl split.

R=garykac@chromium.org

Bug: 1187060
Change-Id: I6eed0fe716a262d5e9b58f64d6ca73bf5f5a205b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3366701
Auto-Submit: Maks Orlovich <morlovich@chromium.org>
Reviewed-by: Gary Kacmarcik <garykac@chromium.org>
Commit-Queue: Gary Kacmarcik <garykac@chromium.org>
Cr-Commit-Position: refs/heads/main@{#955909}
  • Loading branch information
Maks Orlovich authored and Chromium LUCI CQ committed Jan 5, 2022
1 parent 9c14933 commit 8addeb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions remoting/host/setup/me2me_native_messaging_host_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ void MockDaemonControllerDelegate::SetConfigAndStart(
bool consent,
DaemonController::CompletionCallback done) {
// Verify parameters passed in.
if (consent && config && config->HasKey("start")) {
if (consent && config && config->FindKey("start")) {
std::move(done).Run(DaemonController::RESULT_OK);
} else {
std::move(done).Run(DaemonController::RESULT_FAILED);
Expand All @@ -224,7 +224,7 @@ void MockDaemonControllerDelegate::SetConfigAndStart(
void MockDaemonControllerDelegate::UpdateConfig(
std::unique_ptr<base::DictionaryValue> config,
DaemonController::CompletionCallback done) {
if (config && config->HasKey("update")) {
if (config && config->FindKey("update")) {
std::move(done).Run(DaemonController::RESULT_OK);
} else {
std::move(done).Run(DaemonController::RESULT_FAILED);
Expand Down

0 comments on commit 8addeb2

Please sign in to comment.