From 1810bd0e4c8f15eb7740e7a8f50e08ed056ac1cb Mon Sep 17 00:00:00 2001 From: boocmp Date: Fri, 25 Oct 2024 22:46:08 +0700 Subject: [PATCH] Replaced NOTREACHED_IN_MIGRATION with NOTREACHED. --- .../renderer/ai_chat_resource_sniffer.cc | 2 +- .../body_sniffer/body_sniffer_url_loader.cc | 27 +++++++------------ .../de_amp/browser/de_amp_body_handler.cc | 2 +- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/components/ai_chat/renderer/ai_chat_resource_sniffer.cc b/components/ai_chat/renderer/ai_chat_resource_sniffer.cc index 191364eca9ab..829c967ea9ad 100644 --- a/components/ai_chat/renderer/ai_chat_resource_sniffer.cc +++ b/components/ai_chat/renderer/ai_chat_resource_sniffer.cc @@ -82,7 +82,7 @@ bool AIChatResourceSniffer::IsTransformer() const { void AIChatResourceSniffer::Transform( std::string body, base::OnceCallback on_complete) { - NOTREACHED_IN_MIGRATION(); + NOTREACHED(); } void AIChatResourceSniffer::UpdateResponseHead( diff --git a/components/body_sniffer/body_sniffer_url_loader.cc b/components/body_sniffer/body_sniffer_url_loader.cc index 2f0edd4d8fe3..b34e4647c2cc 100644 --- a/components/body_sniffer/body_sniffer_url_loader.cc +++ b/components/body_sniffer/body_sniffer_url_loader.cc @@ -113,7 +113,7 @@ void BodySnifferURLLoader::OnReceiveEarlyHints( network::mojom::EarlyHintsPtr early_hints) { // OnReceiveEarlyHints() shouldn't be called. See the comment in // OnReceiveResponse(). - NOTREACHED_IN_MIGRATION(); + NOTREACHED(); } void BodySnifferURLLoader::OnReceiveResponse( @@ -123,7 +123,7 @@ void BodySnifferURLLoader::OnReceiveResponse( // OnReceiveResponse() shouldn't be called because BodySnifferURLLoader is // created by WillProcessResponse(), which is equivalent // to OnReceiveResponse(). - NOTREACHED_IN_MIGRATION(); + NOTREACHED(); } void BodySnifferURLLoader::OnReceiveRedirect( @@ -132,7 +132,7 @@ void BodySnifferURLLoader::OnReceiveRedirect( // OnReceiveRedirect() shouldn't be called because BodySnifferURLLoader is // created by WillProcessResponse(), which is equivalent // to OnReceiveResponse(). - NOTREACHED_IN_MIGRATION(); + NOTREACHED(); } void BodySnifferURLLoader::OnUploadProgress( @@ -171,10 +171,8 @@ void BodySnifferURLLoader::OnComplete( destination_url_loader_client_->OnComplete(status); return; case State::kAborted: - NOTREACHED_IN_MIGRATION(); - return; + NOTREACHED(); } - NOTREACHED_IN_MIGRATION(); } void BodySnifferURLLoader::FollowRedirect( @@ -184,7 +182,7 @@ void BodySnifferURLLoader::FollowRedirect( const std::optional& new_url) { // BodySnifferURLLoader starts handling the request after // OnReceivedResponse(). A redirect response is not expected. - NOTREACHED_IN_MIGRATION(); + NOTREACHED(); } void BodySnifferURLLoader::SetPriority(net::RequestPriority priority, @@ -238,8 +236,7 @@ void BodySnifferURLLoader::OnBodyReadable(MojoResult) { body_consumer_watcher_.ArmOrNotify(); return; default: - NOTREACHED_IN_MIGRATION(); - return; + NOTREACHED(); } const bool is_body_complete = result == MOJO_RESULT_FAILED_PRECONDITION; @@ -254,8 +251,7 @@ void BodySnifferURLLoader::OnBodyReadable(MojoResult) { handler->OnBodyUpdated(buffered_body_, is_body_complete); switch (action) { case BodyHandler::Action::kNone: - NOTREACHED_IN_MIGRATION() << "Action shouldn't return kNone"; - break; + NOTREACHED() << "Action shouldn't return kNone"; case BodyHandler::Action::kContinue: if (is_body_complete) { overall_action = BodyHandler::Action::kComplete; @@ -404,8 +400,7 @@ void BodySnifferURLLoader::SendReceivedBodyToClient() { body_producer_watcher_.ArmOrNotify(); return; default: - NOTREACHED_IN_MIGRATION(); - return; + NOTREACHED(); } bytes_remaining_in_buffer_ -= actually_sent_bytes; body_producer_watcher_.ArmOrNotify(); @@ -431,8 +426,7 @@ void BodySnifferURLLoader::ForwardBodyToClient() { CompleteSending(); return; default: - NOTREACHED_IN_MIGRATION(); - return; + NOTREACHED(); } size_t actually_written_bytes = 0; @@ -451,8 +445,7 @@ void BodySnifferURLLoader::ForwardBodyToClient() { body_producer_watcher_.ArmOrNotify(); return; default: - NOTREACHED_IN_MIGRATION(); - return; + NOTREACHED(); } body_consumer_handle_->EndReadData(actually_written_bytes); diff --git a/components/de_amp/browser/de_amp_body_handler.cc b/components/de_amp/browser/de_amp_body_handler.cc index 470f360c9b7d..b531ac10c4b2 100644 --- a/components/de_amp/browser/de_amp_body_handler.cc +++ b/components/de_amp/browser/de_amp_body_handler.cc @@ -156,7 +156,7 @@ bool DeAmpBodyHandler::IsTransformer() const { void DeAmpBodyHandler::DeAmpBodyHandler::Transform( std::string body, base::OnceCallback on_complete) { - NOTREACHED_IN_MIGRATION(); + NOTREACHED(); } void DeAmpBodyHandler::UpdateResponseHead(