chore: replace absl::optional<T> with std::optional<T> (#40928)

* chore: replace absl::optional<T> with std::optional<T>

* IWYU
This commit is contained in:
Milan Burda 2024-01-10 23:23:35 +01:00 committed by GitHub
parent fac964ac0d
commit 892c9d78a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
129 changed files with 419 additions and 397 deletions

View file

@ -44,12 +44,12 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host,
base::StringPiece message_str(reinterpret_cast<const char*>(message.data()),
message.size());
absl::optional<base::Value> parsed_message = base::JSONReader::Read(
std::optional<base::Value> parsed_message = base::JSONReader::Read(
message_str, base::JSON_REPLACE_INVALID_CHARACTERS);
if (!parsed_message || !parsed_message->is_dict())
return;
base::Value::Dict& dict = parsed_message->GetDict();
absl::optional<int> id = dict.FindInt("id");
std::optional<int> id = dict.FindInt("id");
if (!id) {
std::string* method = dict.FindString("method");
if (!method)