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
|
@ -93,11 +93,11 @@ ProxyingURLLoaderFactory::InProgressRequest::~InProgressRequest() {
|
|||
}
|
||||
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, absl::nullopt);
|
||||
.Run(net::ERR_ABORTED, std::nullopt, std::nullopt);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -182,7 +182,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::FollowRedirect(
|
|||
const std::vector<std::string>& removed_headers,
|
||||
const net::HttpRequestHeaders& modified_headers,
|
||||
const net::HttpRequestHeaders& modified_cors_exempt_headers,
|
||||
const absl::optional<GURL>& new_url) {
|
||||
const std::optional<GURL>& new_url) {
|
||||
if (new_url)
|
||||
request_.url = new_url.value();
|
||||
|
||||
|
@ -241,7 +241,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnReceiveEarlyHints(
|
|||
void ProxyingURLLoaderFactory::InProgressRequest::OnReceiveResponse(
|
||||
network::mojom::URLResponseHeadPtr head,
|
||||
mojo::ScopedDataPipeConsumerHandle body,
|
||||
absl::optional<mojo_base::BigBuffer> cached_metadata) {
|
||||
std::optional<mojo_base::BigBuffer> cached_metadata) {
|
||||
current_body_ = std::move(body);
|
||||
current_cached_metadata_ = std::move(cached_metadata);
|
||||
if (current_request_uses_header_client_) {
|
||||
|
@ -342,7 +342,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnBeforeSendHeaders(
|
|||
const net::HttpRequestHeaders& headers,
|
||||
OnBeforeSendHeadersCallback callback) {
|
||||
if (!current_request_uses_header_client_) {
|
||||
std::move(callback).Run(net::OK, absl::nullopt);
|
||||
std::move(callback).Run(net::OK, std::nullopt);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnHeadersReceived(
|
|||
const net::IPEndPoint& remote_endpoint,
|
||||
OnHeadersReceivedCallback callback) {
|
||||
if (!current_request_uses_header_client_) {
|
||||
std::move(callback).Run(net::OK, absl::nullopt, GURL());
|
||||
std::move(callback).Run(net::OK, std::nullopt, GURL());
|
||||
|
||||
if (for_cors_preflight_) {
|
||||
// CORS preflight is supported only when "extraHeaders" is specified.
|
||||
|
@ -581,7 +581,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::
|
|||
}
|
||||
|
||||
DCHECK(on_headers_received_callback_);
|
||||
absl::optional<std::string> headers;
|
||||
std::optional<std::string> headers;
|
||||
if (override_headers_) {
|
||||
headers = override_headers_->raw_headers();
|
||||
if (current_request_uses_header_client_) {
|
||||
|
@ -749,7 +749,7 @@ ProxyingURLLoaderFactory::ProxyingURLLoaderFactory(
|
|||
int frame_routing_id,
|
||||
uint64_t* request_id_generator,
|
||||
std::unique_ptr<extensions::ExtensionNavigationUIData> navigation_ui_data,
|
||||
absl::optional<int64_t> navigation_id,
|
||||
std::optional<int64_t> navigation_id,
|
||||
mojo::PendingReceiver<network::mojom::URLLoaderFactory> loader_request,
|
||||
mojo::PendingRemote<network::mojom::URLLoaderFactory> target_factory_remote,
|
||||
mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue