Skip to content

Commit

Permalink
Replaced NOTREACHED_IN_MIGRATION with NOTREACHED.
Browse files Browse the repository at this point in the history
  • Loading branch information
boocmp committed Oct 25, 2024
1 parent 38b470f commit 1810bd0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 19 deletions.
2 changes: 1 addition & 1 deletion components/ai_chat/renderer/ai_chat_resource_sniffer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ bool AIChatResourceSniffer::IsTransformer() const {
void AIChatResourceSniffer::Transform(
std::string body,
base::OnceCallback<void(std::string)> on_complete) {
NOTREACHED_IN_MIGRATION();
NOTREACHED();
}

void AIChatResourceSniffer::UpdateResponseHead(
Expand Down
27 changes: 10 additions & 17 deletions components/body_sniffer/body_sniffer_url_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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(
Expand All @@ -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(
Expand Down Expand Up @@ -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(
Expand All @@ -184,7 +182,7 @@ void BodySnifferURLLoader::FollowRedirect(
const std::optional<GURL>& 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,
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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();
Expand All @@ -431,8 +426,7 @@ void BodySnifferURLLoader::ForwardBodyToClient() {
CompleteSending();
return;
default:
NOTREACHED_IN_MIGRATION();
return;
NOTREACHED();
}

size_t actually_written_bytes = 0;
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion components/de_amp/browser/de_amp_body_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ bool DeAmpBodyHandler::IsTransformer() const {
void DeAmpBodyHandler::DeAmpBodyHandler::Transform(
std::string body,
base::OnceCallback<void(std::string)> on_complete) {
NOTREACHED_IN_MIGRATION();
NOTREACHED();
}

void DeAmpBodyHandler::UpdateResponseHead(
Expand Down

0 comments on commit 1810bd0

Please sign in to comment.