Skip to content

Commit

Permalink
Refactor device_sync to use PrefService::GetValueList
Browse files Browse the repository at this point in the history
This is part of a larger migration effort based on
go/trust-your-prefs.

Bug: 1341998
Test: Existing unit tests
Change-Id: I05272530de55fab91732b473248db4de151046eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3827783
Commit-Queue: Roland Bock <rbock@google.com>
Reviewed-by: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1034803}
  • Loading branch information
Roland Bock authored and Chromium LUCI CQ committed Aug 13, 2022
1 parent b7a1424 commit dec4dc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ash/services/device_sync/cryptauth_scheduler_impl.cc
Expand Up @@ -473,12 +473,12 @@ bool CryptAuthSchedulerImpl::DoesMachineHaveNetworkConnectivity() const {
void CryptAuthSchedulerImpl::InitializePendingRequest(
RequestType request_type) {
// Queue up the persisted scheduled request if applicable.
const base::Value* client_metadata_from_pref =
pref_service_->Get(GetPendingRequestPrefName(request_type));
if (client_metadata_from_pref->GetString() != kNoClientMetadata) {
const base::Value& client_metadata_from_pref =
pref_service_->GetValue(GetPendingRequestPrefName(request_type));
if (client_metadata_from_pref.GetString() != kNoClientMetadata) {
pending_requests_[request_type] =
util::DecodeProtoMessageFromValueString<cryptauthv2::ClientMetadata>(
client_metadata_from_pref);
&client_metadata_from_pref);
}

// If we are recovering from a failure, reset the failure count to 1 in the
Expand Down

0 comments on commit dec4dc6

Please sign in to comment.