Skip to content

Commit

Permalink
CodeHealth: Remove use of Value::GetAsString.
Browse files Browse the repository at this point in the history
This change removes the use of Value::GetAsString and replaces with
Value::is_string, Value::GetString(), Value::GetIfString().

This CL was uploaded by git cl split.

R=rsleevi@chromium.org

Bug: 1187007
Change-Id: I25acdcb3c0ca2d232d6cffbff731ad6731ea2b27
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3098783
Auto-Submit: Sammie Quon <sammiequon@chromium.org>
Reviewed-by: Ryan Sleevi <rsleevi@chromium.org>
Commit-Queue: Ryan Sleevi <rsleevi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#913472}
  • Loading branch information
Sammie Quon authored and Chromium LUCI CQ committed Aug 19, 2021
1 parent d8133d0 commit 49c3ab1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/cert/ct_log_response_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ struct JsonConsistencyProof {
};

bool ConvertIndividualProofNode(const base::Value* value, std::string* result) {
std::string b64_encoded_node;
if (!value->GetAsString(&b64_encoded_node))
const std::string* b64_encoded_node = value->GetIfString();
if (!b64_encoded_node)
return false;

if (!ConvertSHA256RootHash(b64_encoded_node, result))
if (!ConvertSHA256RootHash(*b64_encoded_node, result))
return false;

return true;
Expand Down

0 comments on commit 49c3ab1

Please sign in to comment.