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:
parent
fac964ac0d
commit
892c9d78a3
129 changed files with 419 additions and 397 deletions
|
@ -44,16 +44,16 @@ ProxyingWebSocket::ProxyingWebSocket(
|
|||
/*is_download=*/false,
|
||||
/*is_async=*/true,
|
||||
/*is_service_worker_script=*/false,
|
||||
/*navigation_id=*/absl::nullopt)) {}
|
||||
/*navigation_id=*/std::nullopt)) {}
|
||||
|
||||
ProxyingWebSocket::~ProxyingWebSocket() {
|
||||
if (on_before_send_headers_callback_) {
|
||||
std::move(on_before_send_headers_callback_)
|
||||
.Run(net::ERR_ABORTED, absl::nullopt);
|
||||
.Run(net::ERR_ABORTED, std::nullopt);
|
||||
}
|
||||
if (on_headers_received_callback_) {
|
||||
std::move(on_headers_received_callback_)
|
||||
.Run(net::ERR_ABORTED, absl::nullopt, GURL());
|
||||
.Run(net::ERR_ABORTED, std::nullopt, GURL());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -229,7 +229,7 @@ void ProxyingWebSocket::StartProxying(
|
|||
WebSocketFactory factory,
|
||||
const GURL& url,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<std::string>& user_agent,
|
||||
const std::optional<std::string>& user_agent,
|
||||
mojo::PendingRemote<network::mojom::WebSocketHandshakeClient>
|
||||
handshake_client,
|
||||
bool has_extra_headers,
|
||||
|
@ -358,11 +358,11 @@ void ProxyingWebSocket::OnHeadersReceivedComplete(int error_code) {
|
|||
}
|
||||
|
||||
if (on_headers_received_callback_) {
|
||||
absl::optional<std::string> headers;
|
||||
std::optional<std::string> headers;
|
||||
if (override_headers_)
|
||||
headers = override_headers_->raw_headers();
|
||||
std::move(on_headers_received_callback_)
|
||||
.Run(net::OK, headers, absl::nullopt);
|
||||
.Run(net::OK, headers, std::nullopt);
|
||||
}
|
||||
|
||||
if (override_headers_) {
|
||||
|
@ -384,7 +384,7 @@ void ProxyingWebSocket::OnAuthRequiredComplete(AuthRequiredResponse rv) {
|
|||
switch (rv) {
|
||||
case AuthRequiredResponse::kNoAction:
|
||||
case AuthRequiredResponse::kCancelAuth:
|
||||
std::move(auth_required_callback_).Run(absl::nullopt);
|
||||
std::move(auth_required_callback_).Run(std::nullopt);
|
||||
break;
|
||||
|
||||
case AuthRequiredResponse::kSetAuth:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue