0

Migrate most remaining NOTREACHED()

This s/NOTREACHED()/NOTREACHED_IN_MIGRATION() for most of remaining
src/. Then I went through all changes and made sure that we didn't do
this for comments or "NOTREACHED(): " log strings.

Rolling in the corresponding change for remaining third_party/crashpad
is separately up for review.

Bug: 40580068
Low-Coverage-Reason: TRIVIAL_CHANGE Unreachable code is not reachable.
Change-Id: I707e582b710bf65474db2e3477fa06f5b8d8ea06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5545807
Owners-Override: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Peter Boström <pbos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1302866}
This commit is contained in:
Peter Boström
2024-05-17 21:35:58 +00:00
committed by Chromium LUCI CQ
parent 78842ebdf8
commit 188188db8b
178 changed files with 513 additions and 330 deletions
android_webview
nonembedded
component_updater
test
shell
ash
build/config
cc/trees
chrome
chromecast
chromeos
ash
components
components
components
content
device/fido
extensions
gpu/command_buffer
ios/web
ipc
media
mojo
net
ppapi/proxy
remoting
services
sql
storage/browser/file_system
styleguide/c++
testing/libfuzzer/proto
third_party/blink
tools/json_schema_compiler
ui

@ -98,7 +98,9 @@ void RegisterComponentsForUpdate(
std::make_unique<component_updater::
TrustTokenKeyCommitmentsComponentInstallerPolicy>(
/* on_commitments_ready= */ base::BindRepeating(
[](const std::string& raw_commitments) { NOTREACHED(); })));
[](const std::string& raw_commitments) {
NOTREACHED_IN_MIGRATION();
})));
}
base::RepeatingClosure barrier_closure = base::BarrierClosure(

@ -458,7 +458,7 @@ class FunctorDrawable : public SkDrawable {
protected:
SkRect onGetBounds() override { return SkRect::MakeWH(width_, height_); }
void onDraw(SkCanvas*) override { NOTREACHED(); }
void onDraw(SkCanvas*) override { NOTREACHED_IN_MIGRATION(); }
std::unique_ptr<GpuDrawHandler> onSnapGpuDrawHandler(
GrBackendApi backend_api,

@ -3842,7 +3842,7 @@ class FontTestHelper : public AshTestBase {
~FontTestHelper() override { TearDown(); }
// AshTestBase:
void TestBody() override { NOTREACHED(); }
void TestBody() override { NOTREACHED_IN_MIGRATION(); }
};
bool IsTextSubpixelPositioningEnabled() {

@ -441,7 +441,7 @@ TEST_F(SessionLogHandlerTest, NoUseAfterFree) {
base::RunLoop run_loop;
session_log_handler_->SetLogCreatedClosureForTest(
base::BindLambdaForTesting([]() { NOTREACHED(); }));
base::BindLambdaForTesting([]() { NOTREACHED_IN_MIGRATION(); }));
EXPECT_EQ(0u, task_runner_->NumPendingTasks());
web_ui_.HandleReceivedMessage("saveSessionLog", args);
EXPECT_EQ(1u, task_runner_->NumPendingTasks());

@ -2826,8 +2826,8 @@ TEST_F(ShimlessRmaServiceTest, StartCalibrationFromWrongStateFails) {
const std::vector<rmad::GetStateReply> fake_states = {CreateStateReply(
rmad::RmadState::kDeviceDestination, rmad::RMAD_ERROR_OK)};
fake_rmad_client_()->SetFakeStateReplies(std::move(fake_states));
fake_rmad_client_()->check_state_callback =
base::BindRepeating([](const rmad::RmadState& state) { NOTREACHED(); });
fake_rmad_client_()->check_state_callback = base::BindRepeating(
[](const rmad::RmadState& state) { NOTREACHED_IN_MIGRATION(); });
base::RunLoop run_loop;
shimless_rma_provider_->GetCurrentState(
base::BindLambdaForTesting([&](mojom::StateResultPtr state_result_ptr) {

@ -7,7 +7,7 @@ import("//build/config/compiler/compiler.gni")
import("//build/config/dcheck_always_on.gni")
declare_args() {
# Use LogErrorNotReached() for NOTREACHED().
# Use LogErrorNotReached() for NOTREACHED_IN_MIGRATION().
enable_log_error_not_reached =
is_chromeos_ash && !(is_debug || dcheck_always_on)

@ -492,7 +492,9 @@ class LayerTreeHostProxyTestImplFrameCausesAnimatePending
EndTest();
break;
}
default: { NOTREACHED(); }
default: {
NOTREACHED_IN_MIGRATION();
}
}
}
};
@ -531,7 +533,9 @@ class LayerTreeHostProxyTestNeedsCommitFromImpl
base::Unretained(this)));
break;
}
default: { NOTREACHED(); }
default: {
NOTREACHED_IN_MIGRATION();
}
}
}

@ -43,7 +43,7 @@ class AppShimTerminationManagerImpl : public AppShimTerminationManager,
AppShimTerminationManagerImpl(const AppShimTerminationManagerImpl&) = delete;
AppShimTerminationManagerImpl& operator=(
const AppShimTerminationManagerImpl&) = delete;
~AppShimTerminationManagerImpl() override { NOTREACHED(); }
~AppShimTerminationManagerImpl() override { NOTREACHED_IN_MIGRATION(); }
// AppShimTerminationManager:
void MaybeTerminate() override {

@ -301,7 +301,7 @@ IN_PROC_BROWSER_TEST_P(AppServiceSystemWebAppItemBrowserTest, Activate) {
// Verify that a launch no longer occurs.
web_app::WebAppLaunchProcess::SetOpenApplicationCallbackForTesting(
base::BindLambdaForTesting(
[](apps::AppLaunchParams params) { NOTREACHED(); }));
[](apps::AppLaunchParams params) { NOTREACHED_IN_MIGRATION(); }));
app_item.PerformActivate(ui::EF_NONE);
}

@ -91,7 +91,9 @@ class FailingVideoDecodeAccelerator : public mojom::VideoDecodeAccelerator {
void Decode(mojom::BitstreamBufferPtr bitstream_buffer) override {
NOTREACHED_IN_MIGRATION();
}
void AssignPictureBuffers(uint32_t count) override { NOTREACHED(); }
void AssignPictureBuffers(uint32_t count) override {
NOTREACHED_IN_MIGRATION();
}
void ImportBufferForPicture(int32_t picture_buffer_id,
mojom::HalPixelFormat format,
mojo::ScopedHandle handle,
@ -99,9 +101,11 @@ class FailingVideoDecodeAccelerator : public mojom::VideoDecodeAccelerator {
mojom::BufferModifierPtr modifier) override {
NOTREACHED_IN_MIGRATION();
}
void ReusePictureBuffer(int32_t picture_buffer_id) override { NOTREACHED(); }
void Flush(FlushCallback callback) override { NOTREACHED(); }
void Reset(ResetCallback callback) override { NOTREACHED(); }
void ReusePictureBuffer(int32_t picture_buffer_id) override {
NOTREACHED_IN_MIGRATION();
}
void Flush(FlushCallback callback) override { NOTREACHED_IN_MIGRATION(); }
void Reset(ResetCallback callback) override { NOTREACHED_IN_MIGRATION(); }
private:
mojo::RemoteSet<mojom::VideoDecodeClient> clients_;

@ -368,8 +368,10 @@ TEST_F(DriveFsEventRouterTest, DisplayConfirmDialog_UnmountBeforeResult) {
reason.type = drivefs::mojom::DialogReason::Type::kEnableDocsOffline;
reason.path = base::FilePath("a");
event_router_.DisplayConfirmDialog(
reason, base::BindLambdaForTesting(
[&](drivefs::mojom::DialogResult result) { NOTREACHED(); }));
reason,
base::BindLambdaForTesting([&](drivefs::mojom::DialogResult result) {
NOTREACHED_IN_MIGRATION();
}));
Unmount();
event_router_.OnDialogResult(drivefs::mojom::DialogResult::kAccept);

@ -490,7 +490,7 @@ class FakeRecommendAppsFetcher : public apps::RecommendAppsFetcher {
delegate_->OnLoadSuccess(base::Value(std::move(response_dict)));
}
void Retry() override { NOTREACHED(); }
void Retry() override { NOTREACHED_IN_MIGRATION(); }
private:
const raw_ptr<apps::RecommendAppsFetcherDelegate> delegate_;

@ -123,7 +123,7 @@ class StubRecommendAppsFetcher : public apps::RecommendAppsFetcher {
EXPECT_FALSE(started_);
started_ = true;
}
void Retry() override { NOTREACHED(); }
void Retry() override { NOTREACHED_IN_MIGRATION(); }
protected:
const raw_ptr<apps::RecommendAppsFetcherDelegate> delegate_;

@ -411,7 +411,7 @@ TEST_F(PersonalizationAppSeaPenProviderImplTest, QueryLengthExceeded) {
base::BindLambdaForTesting(
[](std::optional<std::vector<
ash::personalization_app::mojom::SeaPenThumbnailPtr>>,
manta::MantaStatusCode) { NOTREACHED(); }));
manta::MantaStatusCode) { NOTREACHED_IN_MIGRATION(); }));
EXPECT_EQ("SearchWallpaper exceeded maximum text length",
bad_message_observer.WaitForBadMessage())

@ -376,7 +376,8 @@ TEST_F(PersonalizationAppWallpaperProviderImplTest, SelectWallpaperWhenBanned) {
wallpaper_provider_remote()->SelectWallpaper(
image_info.asset_id, /*preview_mode=*/false,
base::BindLambdaForTesting([](bool success) { NOTREACHED(); }));
base::BindLambdaForTesting(
[](bool success) { NOTREACHED_IN_MIGRATION(); }));
EXPECT_EQ("Invalid request to set wallpaper",
bad_message_observer.WaitForBadMessage());
@ -562,8 +563,8 @@ TEST_F(PersonalizationAppWallpaperProviderImplTest, SetDailyRefreshBanned) {
test_wallpaper_controller()->set_can_set_user_wallpaper(false);
mojo::test::BadMessageObserver bad_message_observer;
wallpaper_provider_remote()->SetDailyRefreshCollectionId(
collection_id,
base::BindLambdaForTesting([](bool success) { NOTREACHED(); }));
collection_id, base::BindLambdaForTesting(
[](bool success) { NOTREACHED_IN_MIGRATION(); }));
EXPECT_EQ("Invalid request to set wallpaper",
bad_message_observer.WaitForBadMessage());
}
@ -817,8 +818,9 @@ TEST_F(PersonalizationAppWallpaperProviderImplGooglePhotosTest,
// Test selecting a wallpaper before fetching the enterprise setting.
wallpaper_provider_remote()->SelectGooglePhotosPhoto(
"OmnisVirLupus", ash::WallpaperLayout::WALLPAPER_LAYOUT_CENTER_CROPPED,
/*preview_mode=*/false,
base::BindLambdaForTesting([](bool success) { NOTREACHED(); }));
/*preview_mode=*/false, base::BindLambdaForTesting([](bool success) {
NOTREACHED_IN_MIGRATION();
}));
EXPECT_EQ(
"Cannot call `SelectGooglePhotosPhoto()` without confirming that the "
"Google Photos enterprise setting is enabled.",
@ -835,8 +837,9 @@ TEST_F(PersonalizationAppWallpaperProviderImplGooglePhotosTest,
mojo::test::BadMessageObserver bad_message_observer;
wallpaper_provider_remote()->SelectGooglePhotosPhoto(
"OmnisVirLupus", ash::WallpaperLayout::WALLPAPER_LAYOUT_CENTER_CROPPED,
/*preview_mode=*/false,
base::BindLambdaForTesting([](bool success) { NOTREACHED(); }));
/*preview_mode=*/false, base::BindLambdaForTesting([](bool success) {
NOTREACHED_IN_MIGRATION();
}));
EXPECT_EQ(
"Cannot call `SelectGooglePhotosPhoto()` without confirming that the "
"Google Photos enterprise setting is enabled.",
@ -848,8 +851,8 @@ TEST_F(PersonalizationAppWallpaperProviderImplGooglePhotosTest,
// Test selecting an album before fetching the enterprise setting.
mojo::test::BadMessageObserver bad_message_observer;
wallpaper_provider_remote()->SelectGooglePhotosAlbum(
"OmnisVirLupus",
base::BindLambdaForTesting([](bool success) { NOTREACHED(); }));
"OmnisVirLupus", base::BindLambdaForTesting(
[](bool success) { NOTREACHED_IN_MIGRATION(); }));
EXPECT_EQ(
"Rejected attempt to set Google Photos wallpaper while disabled via "
"enterprise setting.",
@ -884,8 +887,8 @@ TEST_F(PersonalizationAppWallpaperProviderImplGooglePhotosTest,
FetchGooglePhotosEnabled();
mojo::test::BadMessageObserver bad_message_observer;
wallpaper_provider_remote()->SelectGooglePhotosAlbum(
"OmnisVirLupus",
base::BindLambdaForTesting([](bool success) { NOTREACHED(); }));
"OmnisVirLupus", base::BindLambdaForTesting(
[](bool success) { NOTREACHED_IN_MIGRATION(); }));
EXPECT_EQ("Invalid request to select google photos album",
bad_message_observer.WaitForBadMessage());
}

@ -604,7 +604,9 @@ class DevToolsUIBindings::NetworkResourceLoader
bindings_->loaders_.erase(bindings_->loaders_.find(this));
}
void OnRetry(base::OnceClosure start_retry) override { NOTREACHED(); }
void OnRetry(base::OnceClosure start_retry) override {
NOTREACHED_IN_MIGRATION();
}
const int stream_id_;
const raw_ptr<DevToolsUIBindings> bindings_;

@ -66,7 +66,7 @@ class GetFileURLsDelegate : public storage::RecursiveOperationDelegate {
~GetFileURLsDelegate() override = default;
// RecursiveOperationDelegate:
void Run() override { NOTREACHED(); }
void Run() override { NOTREACHED_IN_MIGRATION(); }
void RunRecursively() override {
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
StartRecursiveOperation(root_,

@ -158,7 +158,7 @@ class ExtensionGlobalError : public GlobalErrorWithStandardBubble {
return {};
}
void ExecuteMenuItem(Browser* browser) override { NOTREACHED(); }
void ExecuteMenuItem(Browser* browser) override { NOTREACHED_IN_MIGRATION(); }
std::u16string GetBubbleViewTitle() override {
return GenerateTitle(delegate_->GetBlocklistedExtensions(),

@ -377,7 +377,8 @@ void ExtensionSyncService::ApplySyncData(
case -1: state = INSTALLED_OUTDATED; break;
case 0: state = INSTALLED_MATCHING; break;
case 1: state = INSTALLED_NEWER; break;
default: NOTREACHED();
default:
NOTREACHED_IN_MIGRATION();
}
}

@ -706,7 +706,8 @@ TEST_F(NativeDesktopMediaListTest, EmptyThumbnail) {
&run_loop)));
// Called upon webrtc::DesktopCapturer::CaptureFrame() call.
ON_CALL(observer_, OnSourceThumbnailChanged(_))
.WillByDefault(testing::InvokeWithoutArgs([]() { NOTREACHED(); }));
.WillByDefault(
testing::InvokeWithoutArgs([]() { NOTREACHED_IN_MIGRATION(); }));
model_->StartUpdating(&observer_);

@ -329,7 +329,9 @@ class LogFileWriterTest
EXPECT_EQ(uncompressed, expected_contents);
break;
}
default: { NOTREACHED(); }
default: {
NOTREACHED_IN_MIGRATION();
}
}
}

@ -82,7 +82,7 @@ class FakeProtocolHandlerDelegate : public ExternalProtocolHandler::Delegate {
return ExternalProtocolHandler::BlockState::DONT_BLOCK;
}
void BlockRequest() override { NOTREACHED(); }
void BlockRequest() override { NOTREACHED_IN_MIGRATION(); }
void RunExternalProtocolDialog(
const GURL& url,

@ -518,7 +518,7 @@ class ExpectInvalidUtf8Client : public network::mojom::WebSocketClient {
NOTREACHED_IN_MIGRATION();
}
void OnClosingHandshake() override { NOTREACHED(); }
void OnClosingHandshake() override { NOTREACHED_IN_MIGRATION(); }
private:
void OnDisconnect(uint32_t reason, const std::string& message) {

@ -49,13 +49,13 @@ NonPersistentNotificationMetadata::From(const Metadata* metadata) {
// static
void NotificationCommon::OpenNotificationSettings(Profile* profile,
const GURL& origin) {
// TODO(peter): Use the |origin| to direct the user to a more appropriate
// settings page to toggle permission.
// TODO(peter): Use the |origin| to direct the user to a more appropriate
// settings page to toggle permission.
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS_ASH)
// Android settings are handled through Java. Chrome OS settings are handled
// through the tray's setting panel.
NOTREACHED();
// Android settings are handled through Java. Chrome OS settings are handled
// through the tray's setting panel.
NOTREACHED_IN_MIGRATION();
#else
chrome::ScopedTabbedBrowserDisplayer browser_displayer(profile);
chrome::ShowContentSettingsExceptions(browser_displayer.browser(),

@ -88,7 +88,7 @@ class NeverRunsExternalProtocolHandlerDelegate
NOTREACHED_IN_MIGRATION();
}
void FinishedProcessingCheck() override { NOTREACHED(); }
void FinishedProcessingCheck() override { NOTREACHED_IN_MIGRATION(); }
};
} // namespace

@ -345,7 +345,9 @@ class TestPrintViewManagerWin : public PrintViewManagerBase {
SetupScriptedPrintPreviewCallback callback) override {
NOTREACHED_IN_MIGRATION();
}
void ShowScriptedPrintPreview(bool is_modifiable) override { NOTREACHED(); }
void ShowScriptedPrintPreview(bool is_modifiable) override {
NOTREACHED_IN_MIGRATION();
}
void RequestPrintPreview(
mojom::RequestPrintPreviewParamsPtr params) override {
NOTREACHED_IN_MIGRATION();

@ -31,11 +31,15 @@ class FakeChooserView : public permissions::ChooserController::View {
delete this;
}
void OnOptionAdded(size_t index) override { NOTREACHED(); }
void OnOptionRemoved(size_t index) override { NOTREACHED(); }
void OnOptionUpdated(size_t index) override { NOTREACHED(); }
void OnAdapterEnabledChanged(bool enabled) override { NOTREACHED(); }
void OnRefreshStateChanged(bool refreshing) override { NOTREACHED(); }
void OnOptionAdded(size_t index) override { NOTREACHED_IN_MIGRATION(); }
void OnOptionRemoved(size_t index) override { NOTREACHED_IN_MIGRATION(); }
void OnOptionUpdated(size_t index) override { NOTREACHED_IN_MIGRATION(); }
void OnAdapterEnabledChanged(bool enabled) override {
NOTREACHED_IN_MIGRATION();
}
void OnRefreshStateChanged(bool refreshing) override {
NOTREACHED_IN_MIGRATION();
}
private:
std::unique_ptr<permissions::ChooserController> controller_;

@ -52,7 +52,7 @@ class DisplayModeChangeWaiter : public WebAppRegistrarObserver {
void Wait() { run_loop_.Run(); }
void OnAppRegistrarDestroyed() override { NOTREACHED(); }
void OnAppRegistrarDestroyed() override { NOTREACHED_IN_MIGRATION(); }
private:
base::RunLoop run_loop_;

@ -479,7 +479,7 @@ IN_PROC_BROWSER_TEST_P(ManagedScreensaverBrowserTestForAnyScreen, BasicTest) {
test_api.WaitForPhotoTransitionAnimationCompleted(
/*num_completions=*/3, /*timeout=*/3 * kTestPerTransitionTimeout,
/*on_complete=*/test_future_->GetCallback(),
/*on_timeout=*/base::BindOnce([]() { NOTREACHED(); }));
/*on_timeout=*/base::BindOnce([]() { NOTREACHED_IN_MIGRATION(); }));
ASSERT_TRUE(test_future_->Wait());
ASSERT_NE(nullptr, GetContainerView());
@ -490,7 +490,7 @@ IN_PROC_BROWSER_TEST_P(ManagedScreensaverBrowserTestForAnyScreen, BasicTest) {
test_future_ = std::make_unique<base::test::TestFuture<void>>();
test_api.WaitForPhotoTransitionAnimationCompleted(
/*num_completions=*/1, /*timeout=*/kTestPerTransitionTimeout,
/*on_complete=*/base::BindOnce([]() { NOTREACHED(); }),
/*on_complete=*/base::BindOnce([]() { NOTREACHED_IN_MIGRATION(); }),
/*on_timeout=*/test_future_->GetCallback());
ASSERT_TRUE(test_future_->Wait());
{
@ -510,7 +510,7 @@ IN_PROC_BROWSER_TEST_P(ManagedScreensaverBrowserTestForAnyScreen,
test_future_ = std::make_unique<base::test::TestFuture<void>>();
test_api.WaitForPhotoTransitionAnimationCompleted(
/*num_completions=*/1, /*timeout=*/kTestPerTransitionTimeout,
/*on_complete=*/base::BindOnce([]() { NOTREACHED(); }),
/*on_complete=*/base::BindOnce([]() { NOTREACHED_IN_MIGRATION(); }),
/*on_timeout=*/test_future_->GetCallback());
ASSERT_TRUE(test_future_->Wait());
@ -529,7 +529,7 @@ IN_PROC_BROWSER_TEST_P(ManagedScreensaverBrowserTestForAnyScreen,
// The large image will not even be downloaded and will fail to download.
test_api.WaitForPhotoTransitionAnimationCompleted(
/*num_completions=*/1, /*timeout=*/kTestPerTransitionTimeout,
/*on_complete=*/base::BindOnce([]() { NOTREACHED(); }),
/*on_complete=*/base::BindOnce([]() { NOTREACHED_IN_MIGRATION(); }),
/*on_timeout=*/test_future_->GetCallback());
ASSERT_TRUE(test_future_->Wait());
ASSERT_EQ(nullptr, GetContainerView());
@ -548,7 +548,7 @@ IN_PROC_BROWSER_TEST_P(ManagedScreensaverBrowserTestForAnyScreen,
// show images as the second image will fail to decode.
test_api.WaitForPhotoTransitionAnimationCompleted(
/*num_completions=*/1, /*timeout=*/kTestPerTransitionTimeout,
/*on_complete=*/base::BindOnce([]() { NOTREACHED(); }),
/*on_complete=*/base::BindOnce([]() { NOTREACHED_IN_MIGRATION(); }),
/*on_timeout=*/test_future_->GetCallback());
ASSERT_TRUE(test_future_->Wait());
ASSERT_EQ(nullptr, GetContainerView());
@ -567,7 +567,7 @@ IN_PROC_BROWSER_TEST_P(ManagedScreensaverBrowserTestForAnyScreen,
test_api.WaitForPhotoTransitionAnimationCompleted(
/*num_completions=*/3, /*timeout=*/3 * kTestPerTransitionTimeout,
/*on_complete=*/test_future_->GetCallback(),
/*on_timeout=*/base::BindOnce([]() { NOTREACHED(); }));
/*on_timeout=*/base::BindOnce([]() { NOTREACHED_IN_MIGRATION(); }));
ASSERT_TRUE(test_future_->Wait());
{
base::ScopedAllowBlockingForTesting allow_blocking;
@ -579,7 +579,7 @@ IN_PROC_BROWSER_TEST_P(ManagedScreensaverBrowserTestForAnyScreen,
test_future_ = std::make_unique<base::test::TestFuture<void>>();
test_api.WaitForPhotoTransitionAnimationCompleted(
/*num_completions=*/1, /*timeout=*/kTestPerTransitionTimeout,
/*on_complete=*/base::BindOnce([]() { NOTREACHED(); }),
/*on_complete=*/base::BindOnce([]() { NOTREACHED_IN_MIGRATION(); }),
/*on_timeout=*/test_future_->GetCallback());
ASSERT_TRUE(test_future_->Wait());
{

@ -588,7 +588,7 @@ void AutofillContextMenuManager::LogManualFallbackContextMenuEntryAccepted(
case FillingProduct::kIban:
case FillingProduct::kAutocomplete:
case FillingProduct::kCompose:
NOTREACHED();
NOTREACHED_IN_MIGRATION();
}
}

@ -88,7 +88,7 @@ class ExternalProtocolHandlerDelegate
content::WebContents* web_contents) override {
NOTREACHED_IN_MIGRATION();
}
void FinishedProcessingCheck() override { NOTREACHED(); }
void FinishedProcessingCheck() override { NOTREACHED_IN_MIGRATION(); }
base::test::TestFuture<void> future;
};

@ -54,7 +54,9 @@ class SilentTurnSyncOnHelperDelegate : public TurnSyncOnHelper::Delegate {
NOTREACHED_IN_MIGRATION();
}
void ShowLoginError(const SigninUIError& error) override { NOTREACHED(); }
void ShowLoginError(const SigninUIError& error) override {
NOTREACHED_IN_MIGRATION();
}
void ShowMergeSyncDataConfirmation(const std::string&,
const std::string&,
@ -62,9 +64,9 @@ class SilentTurnSyncOnHelperDelegate : public TurnSyncOnHelper::Delegate {
NOTREACHED_IN_MIGRATION();
}
void ShowSyncSettings() override { NOTREACHED(); }
void ShowSyncSettings() override { NOTREACHED_IN_MIGRATION(); }
void SwitchToProfile(Profile*) override { NOTREACHED(); }
void SwitchToProfile(Profile*) override { NOTREACHED_IN_MIGRATION(); }
};
} // namespace

@ -79,7 +79,7 @@ class TestDelegate : public permissions::PermissionPrompt::Delegate {
void Deny() override { requests_.clear(); }
void Dismiss() override { requests_.clear(); }
void Ignore() override { requests_.clear(); }
void FinalizeCurrentRequests() override { NOTREACHED(); }
void FinalizeCurrentRequests() override { NOTREACHED_IN_MIGRATION(); }
void OpenHelpCenterLink(const ui::Event& event) override {}
void PreIgnoreQuietPrompt() override { requests_.clear(); }
void SetManageClicked() override { requests_.clear(); }

@ -65,7 +65,9 @@ class Delegate : public TurnSyncOnHelper::Delegate {
~Delegate() override = default;
// TurnSyncOnHelper::Delegate:
void ShowLoginError(const SigninUIError& error) override { NOTREACHED(); }
void ShowLoginError(const SigninUIError& error) override {
NOTREACHED_IN_MIGRATION();
}
void ShowMergeSyncDataConfirmation(
const std::string& previous_email,
const std::string& new_email,
@ -86,8 +88,10 @@ class Delegate : public TurnSyncOnHelper::Delegate {
SyncConfirmationCallback callback) override {
AdvanceFlowOrCapture(BlockingStep::kSyncDisabled, std::move(callback));
}
void ShowSyncSettings() override { NOTREACHED(); }
void SwitchToProfile(Profile* new_profile) override { NOTREACHED(); }
void ShowSyncSettings() override { NOTREACHED_IN_MIGRATION(); }
void SwitchToProfile(Profile* new_profile) override {
NOTREACHED_IN_MIGRATION();
}
BlockingStep blocking_step() const { return blocking_step_; }

@ -33,11 +33,15 @@ class FakeChooserView : public permissions::ChooserController::View {
delete this;
}
void OnOptionAdded(size_t index) override { NOTREACHED(); }
void OnOptionRemoved(size_t index) override { NOTREACHED(); }
void OnOptionUpdated(size_t index) override { NOTREACHED(); }
void OnAdapterEnabledChanged(bool enabled) override { NOTREACHED(); }
void OnRefreshStateChanged(bool refreshing) override { NOTREACHED(); }
void OnOptionAdded(size_t index) override { NOTREACHED_IN_MIGRATION(); }
void OnOptionRemoved(size_t index) override { NOTREACHED_IN_MIGRATION(); }
void OnOptionUpdated(size_t index) override { NOTREACHED_IN_MIGRATION(); }
void OnAdapterEnabledChanged(bool enabled) override {
NOTREACHED_IN_MIGRATION();
}
void OnRefreshStateChanged(bool refreshing) override {
NOTREACHED_IN_MIGRATION();
}
private:
std::unique_ptr<permissions::ChooserController> controller_;

@ -1168,9 +1168,9 @@ IN_PROC_BROWSER_TEST_F(ManifestUpdateManagerBrowserTest,
WebAppInstallManagerObserverAdapter install_observer(
&GetProvider().install_manager());
install_observer.SetWebAppInstalledDelegate(base::BindLambdaForTesting(
[](const webapps::AppId& app_id) { NOTREACHED(); }));
[](const webapps::AppId& app_id) { NOTREACHED_IN_MIGRATION(); }));
install_observer.SetWebAppUninstalledDelegate(base::BindLambdaForTesting(
[](const webapps::AppId& app_id) { NOTREACHED(); }));
[](const webapps::AppId& app_id) { NOTREACHED_IN_MIGRATION(); }));
// CSS #RRGGBBAA syntax.
OverrideManifest(kManifestTemplate, {kInstallableIconList, "#00FF00F0"});

@ -245,7 +245,7 @@ class MockAppRegistrarObserver : public WebAppRegistrarObserver {
return on_policy_changed_call_count;
}
void OnAppRegistrarDestroyed() override { NOTREACHED(); }
void OnAppRegistrarDestroyed() override { NOTREACHED_IN_MIGRATION(); }
private:
int on_policy_changed_call_count = 0;

@ -347,8 +347,10 @@ class EnclaveManagerTest : public testing::Test, EnclaveManager::Observer {
*manager_.GetWrappedSecret(/*version=*/kSecretVersion);
ui_request->entity = std::move(entity);
ui_request->claimed_pin = std::move(claimed_pin);
ui_request->save_passkey_callback = base::BindOnce(
[](sync_pb::WebauthnCredentialSpecifics) { NOTREACHED(); });
ui_request->save_passkey_callback =
base::BindOnce([](sync_pb::WebauthnCredentialSpecifics) {
NOTREACHED_IN_MIGRATION();
});
enclave::EnclaveAuthenticator authenticator(
std::move(ui_request), /*network_context_factory=*/

@ -50,8 +50,8 @@ class PixelTestUi : public TestBrowserUi {
~PixelTestUi() override = default;
// TestBrowserUi:
void ShowUi(const std::string& name) override { NOTREACHED(); }
void WaitForUserDismissal() override { NOTREACHED(); }
void ShowUi(const std::string& name) override { NOTREACHED_IN_MIGRATION(); }
void WaitForUserDismissal() override { NOTREACHED_IN_MIGRATION(); }
bool VerifyUi() override {
return VerifyUiWithResult() != ui::test::ActionResult::kFailed;

@ -271,7 +271,7 @@ class AppInstallProgressIPC : public AppInstallProgress {
time_remaining, pos));
}
void OnPause() override { NOTREACHED(); }
void OnPause() override { NOTREACHED_IN_MIGRATION(); }
void OnComplete(const ObserverCompletionInfo& observer_info) override {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);

@ -116,7 +116,7 @@ class CastAudioOutputStream::MixerServiceWrapper
int64_t delay_timestamp,
int64_t delay) override;
// We don't push an EOS buffer.
void OnEosPlayed() override { NOTREACHED(); }
void OnEosPlayed() override { NOTREACHED_IN_MIGRATION(); }
const ::media::AudioParameters audio_params_;
const std::string device_id_;

@ -12,9 +12,9 @@
// swap in their implementation it complains about missing symbols.
#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
#include <stdlib.h> // abort()
#define NOTREACHED() abort()
#define NOTREACHED_IN_MIGRATION() abort()
#else
#define NOTREACHED() static_cast<void>(0)
#define NOTREACHED_IN_MIGRATION() static_cast<void>(0)
#endif
namespace chromecast {

@ -94,7 +94,7 @@ class TestSocket : public SmallMessageSocket::Delegate {
SmallMessageSocket* socket() { return &socket_; }
private:
void OnError(int error) override { NOTREACHED(); }
void OnError(int error) override { NOTREACHED_IN_MIGRATION(); }
bool OnMessage(char* data, size_t size) override {
message_history_.push_back(size);

@ -6,9 +6,9 @@
#if !defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)
#include <stdlib.h> // abort()
#define NOTREACHED() abort()
#define NOTREACHED_IN_MIGRATION() abort()
#else
#define NOTREACHED() static_cast<void>(0)
#define NOTREACHED_IN_MIGRATION() static_cast<void>(0)
#endif
namespace chromecast {
@ -35,7 +35,7 @@ bool RebootShlib::IsFdrForNextRebootSupported() {
}
void RebootShlib::SetFdrForNextReboot() {
NOTREACHED();
NOTREACHED_IN_MIGRATION();
}
bool RebootShlib::IsOtaForNextRebootSupported() {
@ -43,7 +43,7 @@ bool RebootShlib::IsOtaForNextRebootSupported() {
}
void RebootShlib::SetOtaForNextReboot() {
NOTREACHED();
NOTREACHED_IN_MIGRATION();
}
bool RebootShlib::IsClearOtaForNextRebootSupported() {
@ -51,7 +51,7 @@ bool RebootShlib::IsClearOtaForNextRebootSupported() {
}
void RebootShlib::ClearOtaForNextReboot() {
NOTREACHED();
NOTREACHED_IN_MIGRATION();
}
} // namespace chromecast

@ -108,7 +108,9 @@ class TraceCopyTask : public base::MessagePumpLibevent::FdWatcher {
}
// base::MessagePumpLibevent::FdWatcher:
void OnFileCanReadWithoutBlocking(int fd) override { NOTREACHED(); }
void OnFileCanReadWithoutBlocking(int fd) override {
NOTREACHED_IN_MIGRATION();
}
void OnFileCanWriteWithoutBlocking(int fd) override {
DCHECK_EQ(out_fd_.get(), fd);
CopyTraceData();
@ -197,7 +199,9 @@ class TraceConnection : public base::MessagePumpLibevent::FdWatcher {
DCHECK_EQ(connection_fd_.get(), fd);
ReceiveClientMessage();
}
void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); }
void OnFileCanWriteWithoutBlocking(int fd) override {
NOTREACHED_IN_MIGRATION();
}
private:
enum class State {
@ -361,7 +365,9 @@ class TracingService : public base::MessagePumpLibevent::FdWatcher {
DCHECK_EQ(server_socket_.get(), fd);
AcceptConnection();
}
void OnFileCanWriteWithoutBlocking(int fd) override { NOTREACHED(); }
void OnFileCanWriteWithoutBlocking(int fd) override {
NOTREACHED_IN_MIGRATION();
}
private:
void AcceptConnection() {

@ -606,9 +606,11 @@ TEST_F(DriveFsHostTest, DisplayConfirmDialogImpl_IgnoreIfNoHandler) {
TEST_F(DriveFsHostTest, DisplayConfirmDialogImpl_IgnoreUnknownReasonTypes) {
ASSERT_NO_FATAL_FAILURE(DoMount());
host_->set_dialog_handler(base::BindRepeating(
[](const mojom::DialogReason&,
base::OnceCallback<void(mojom::DialogResult)>) { NOTREACHED(); }));
host_->set_dialog_handler(
base::BindRepeating([](const mojom::DialogReason&,
base::OnceCallback<void(mojom::DialogResult)>) {
NOTREACHED_IN_MIGRATION();
}));
bool called = false;
delegate_->DisplayConfirmDialog(
mojom::DialogReason::New(

@ -35,7 +35,7 @@ ScopedMahiMediaAppEventsProxySetter::ScopedMahiMediaAppEventsProxySetter(
MahiMediaAppEventsProxy* proxy) {
// Only allow one scoped instance at a time.
if (instance_) {
NOTREACHED();
NOTREACHED_IN_MIGRATION();
return;
}
instance_ = this;
@ -47,7 +47,7 @@ ScopedMahiMediaAppEventsProxySetter::ScopedMahiMediaAppEventsProxySetter(
ScopedMahiMediaAppEventsProxySetter::~ScopedMahiMediaAppEventsProxySetter() {
if (instance_ != this) {
NOTREACHED();
NOTREACHED_IN_MIGRATION();
return;
}

@ -425,7 +425,7 @@ TEST_F(AccountManagerFacadeImplTest, GetAccountsHangsWhenRemoteIsNull) {
base::OnceCallback<void(const std::vector<Account>&)> dropped_callback =
base::BindLambdaForTesting(
[scoped_closure = std::move(scoped_closure)](
const std::vector<Account>&) { NOTREACHED(); });
const std::vector<Account>&) { NOTREACHED_IN_MIGRATION(); });
EXPECT_FALSE(callback_was_dropped);
account_manager_facade->GetAccounts(std::move(dropped_callback));
// `dropped_callback` was destroyed without being run.

@ -130,8 +130,8 @@ int StaleHostResolver::RequestImpl::Start(
cache_parameters.source = net::HostResolverSource::LOCAL_ONLY;
cache_request_ = resolver_->inner_resolver_->CreateRequest(
host_, network_anonymization_key_, net_log_, cache_parameters);
int error =
cache_request_->Start(base::BindOnce([](int error) { NOTREACHED(); }));
int error = cache_request_->Start(
base::BindOnce([](int error) { NOTREACHED_IN_MIGRATION(); }));
DCHECK_NE(net::ERR_IO_PENDING, error);
cache_error_ = cache_request_->GetResolveErrorInfo().error;
DCHECK_NE(net::ERR_IO_PENDING, cache_error_);

@ -293,8 +293,8 @@ TEST(URLRequestContextConfigTest, TestExperimentalOptionParsing) {
context->host_resolver()->CreateRequest(
net::HostPortPair("abcde", 80), net::NetworkAnonymizationKey(),
net::NetLogWithSource(), std::nullopt);
EXPECT_EQ(net::OK, resolve_request->Start(
base::BindOnce([](int error) { NOTREACHED(); })));
EXPECT_EQ(net::OK, resolve_request->Start(base::BindOnce(
[](int error) { NOTREACHED_IN_MIGRATION(); })));
EXPECT_TRUE(config->network_thread_priority);
EXPECT_EQ(42, config->network_thread_priority.value());

@ -140,7 +140,7 @@ net::NetworkTrafficAnnotationTag GetNetworkTrafficAnnotation(
return MISSING_TRAFFIC_ANNOTATION;
case ModelBasedCapabilityKey::kPromptApi:
// On-device only feature.
NOTREACHED();
NOTREACHED_IN_MIGRATION();
return MISSING_TRAFFIC_ANNOTATION;
}
}

@ -574,14 +574,15 @@ class QuicklyDeletedRequest : public PermissionRequest {
QuicklyDeletedRequest(const GURL& requesting_origin,
RequestType request_type,
PermissionRequestGestureType gesture_type)
: PermissionRequest(requesting_origin,
request_type,
gesture_type == PermissionRequestGestureType::GESTURE,
base::BindLambdaForTesting(
[](ContentSetting result,
bool is_one_time,
bool is_final_decision) { NOTREACHED(); }),
base::NullCallback()) {}
: PermissionRequest(
requesting_origin,
request_type,
gesture_type == PermissionRequestGestureType::GESTURE,
base::BindLambdaForTesting(
[](ContentSetting result,
bool is_one_time,
bool is_final_decision) { NOTREACHED_IN_MIGRATION(); }),
base::NullCallback()) {}
static std::unique_ptr<QuicklyDeletedRequest> CreateRequest(
MockPermissionRequest* request) {

@ -78,7 +78,7 @@ class FontRenderParams {
FontRenderParams() = default;
~FontRenderParams() { NOTREACHED(); }
~FontRenderParams() { NOTREACHED_IN_MIGRATION(); }
THREAD_CHECKER(thread_checker_);
std::optional<gfx::FontRenderParams> params_;

@ -698,8 +698,8 @@ void CompositorFrameSinkSupport::SubmitCompositorFrameLocally(
pending_frames_.push_back(FrameData{.local_frame = true});
Surface* surface = surface_manager_->GetSurfaceForId(surface_id);
auto frame_rejected_callback =
base::ScopedClosureRunner(base::BindOnce([] { NOTREACHED(); }));
auto frame_rejected_callback = base::ScopedClosureRunner(
base::BindOnce([] { NOTREACHED_IN_MIGRATION(); }));
auto frame_index = ++last_frame_index_;
Surface::QueueFrameResult result = surface->QueueFrame(
std::move(frame), frame_index, std::move(frame_rejected_callback));

@ -158,7 +158,9 @@ std::optional<AggregatableReportRequest> CreateAggregatableReportRequest(
absl::visit(
base::Overloaded{
[](const AttributionReport::EventLevelData&) { NOTREACHED(); },
[](const AttributionReport::EventLevelData&) {
NOTREACHED_IN_MIGRATION();
},
[&](const AttributionReport::AggregatableAttributionData& data) {
source_time = data.source.source_time();
source_debug_key = data.source.debug_key();

@ -148,7 +148,7 @@ class CallbackWrapper : public Base {
void sendFailure(const DispatchResponse& response) override {
callback_->sendFailure(response);
}
void fallThrough() override { NOTREACHED(); }
void fallThrough() override { NOTREACHED_IN_MIGRATION(); }
~CallbackWrapper() override {}
std::unique_ptr<Callback> callback_;

@ -103,7 +103,7 @@ class DirectSocketsUdpBrowserTest : public ContentBrowserTest {
std::move(listener_receiver_remote));
server_socket_.set_disconnect_handler(
base::BindLambdaForTesting([]() { NOTREACHED(); }));
base::BindLambdaForTesting([]() { NOTREACHED_IN_MIGRATION(); }));
net::IPEndPoint server_addr(net::IPAddress::IPv4Localhost(), 0);
auto server_helper =

@ -561,11 +561,15 @@ class IndexedDBConnectionCoordinator::DeleteRequest
state_ = RequestState::kDone;
}
void BindTransactionReceiver() override { NOTREACHED(); }
void BindTransactionReceiver() override { NOTREACHED_IN_MIGRATION(); }
void UpgradeTransactionStarted(int64_t old_version) override { NOTREACHED(); }
void UpgradeTransactionStarted(int64_t old_version) override {
NOTREACHED_IN_MIGRATION();
}
void UpgradeTransactionFinished(bool committed) override { NOTREACHED(); }
void UpgradeTransactionFinished(bool committed) override {
NOTREACHED_IN_MIGRATION();
}
// The delete requests should always be run during force close.
bool ShouldPruneForForceClose() override { return false; }

@ -853,7 +853,9 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
break;
}
default: { NOTREACHED(); }
default: {
NOTREACHED_IN_MIGRATION();
}
}
if (capturer)

@ -297,7 +297,7 @@ class FakeVideoCaptureStackReceiver final : public media::VideoFrameReceiver {
capture_stack_->SetStarted();
}
void OnStartedUsingGpuDecode() override { NOTREACHED(); }
void OnStartedUsingGpuDecode() override { NOTREACHED_IN_MIGRATION(); }
void OnStopped() override {}

@ -220,7 +220,7 @@ class MockVideoFrameReceiver : public media::VideoFrameReceiver {
MOCK_METHOD1(OnLog, void(const std::string& message));
MOCK_METHOD0(OnStarted, void());
MOCK_METHOD0(OnStopped, void());
void OnStartedUsingGpuDecode() final { NOTREACHED(); }
void OnStartedUsingGpuDecode() final { NOTREACHED_IN_MIGRATION(); }
base::ReadOnlySharedMemoryRegion TakeBufferHandle(int buffer_id) {
DCHECK_NOT_ON_DEVICE_THREAD();

@ -59,7 +59,7 @@ class TestReceiverCollector : public mojom::TestInterfaceForDefer,
}
// mojom::TestInterfaceForDefer implementation.
void Ping(PingCallback callback) override { NOTREACHED(); }
void Ping(PingCallback callback) override { NOTREACHED_IN_MIGRATION(); }
// Will be called when MojoBinderPolicyApplier::ApplyPolicyToBinder()
// handles a kCancel binding request.

@ -1074,8 +1074,9 @@ TEST_P(PrefetchStreamingURLLoaderTest, RedirectSwitchInNetworkContext) {
// on_receive_head_callback_ is not called, and is passed to the
// follow up PrefetchStreamingURLLoader that will follow the redirect
// in the other network context.
std::get<0>(GetParam()) ? base::BindOnce([]() { NOTREACHED(); })
: base::OnceClosure(),
std::get<0>(GetParam())
? base::BindOnce([]() { NOTREACHED_IN_MIGRATION(); })
: base::OnceClosure(),
response_reader->GetWeakPtr());
// Simulate a redirect that should not be followed by the URL loader.

@ -843,7 +843,9 @@ class MediaStreamManager::DeviceRequest {
// TODO(crbug.com/40247147): Combine FinalizeRequest and
// FinalizeMediaAccessRequest, implement it for the remaining subclasses and
// make it into on pure virtual function.
virtual void FinalizeRequest(const std::string& label) { NOTREACHED(); }
virtual void FinalizeRequest(const std::string& label) {
NOTREACHED_IN_MIGRATION();
}
virtual void FinalizeMediaAccessRequest(
const std::string& label,
@ -853,7 +855,9 @@ class MediaStreamManager::DeviceRequest {
virtual void FinalizeRequestFailed(MediaStreamRequestResult result) = 0;
virtual void FinalizeChangeDevice(const std::string& label) { NOTREACHED(); }
virtual void FinalizeChangeDevice(const std::string& label) {
NOTREACHED_IN_MIGRATION();
}
virtual void OnRequestStateChangeFromBrowser(
const std::string& label,

@ -3697,7 +3697,8 @@ IN_PROC_BROWSER_TEST_F(RenderFrameHostImplBrowserTest,
// Call RequestAXSnapshotTree method. The browser process should not crash.
auto params = mojom::SnapshotAccessibilityTreeParams::New();
rfh->RequestAXTreeSnapshot(
base::BindOnce([](const ui::AXTreeUpdate& snapshot) { NOTREACHED(); }),
base::BindOnce(
[](const ui::AXTreeUpdate& snapshot) { NOTREACHED_IN_MIGRATION(); }),
std::move(params));
base::RunLoop().RunUntilIdle();

@ -101,7 +101,7 @@ class ServiceWorkerSingleScriptUpdateChecker::WrappedIOBuffer
~WrappedIOBuffer() override = default;
// This is to make sure that the vtable is not merged with other classes.
virtual void dummy() { NOTREACHED(); }
virtual void dummy() { NOTREACHED_IN_MIGRATION(); }
};
ServiceWorkerSingleScriptUpdateChecker::ServiceWorkerSingleScriptUpdateChecker(

@ -684,7 +684,9 @@ void WebRTCInternals::FileSelected(const ui::SelectedFileInfo& file,
EnableAudioDebugRecordingsOnAllRenderProcessHosts();
break;
}
default: { NOTREACHED(); }
default: {
NOTREACHED_IN_MIGRATION();
}
}
}

@ -56,7 +56,7 @@ class PepperTryCatchForTest : public PepperTryCatch {
PepperTryCatchForTest(const PepperTryCatchForTest&) = delete;
PepperTryCatchForTest& operator=(const PepperTryCatchForTest&) = delete;
void SetException(const char* message) override { NOTREACHED(); }
void SetException(const char* message) override { NOTREACHED_IN_MIGRATION(); }
bool HasException() override { return false; }
v8::Local<v8::Context> GetContext() override {
return instance_->GetIsolate()->GetCurrentContext();

@ -69,7 +69,9 @@ class MockResourceConverter : public content::ResourceConverter {
~MockResourceConverter() override {}
void Reset() override {}
bool NeedsFlush() override { return false; }
void Flush(base::OnceCallback<void(bool)> callback) override { NOTREACHED(); }
void Flush(base::OnceCallback<void(bool)> callback) override {
NOTREACHED_IN_MIGRATION();
}
bool FromV8Value(v8::Local<v8::Object> val,
v8::Local<v8::Context> context,
PP_Var* result,

@ -143,7 +143,9 @@ class ShellDevToolsBindings::NetworkResourceLoader
bindings_->loaders_.erase(bindings_->loaders_.find(this));
}
void OnRetry(base::OnceClosure start_retry) override { NOTREACHED(); }
void OnRetry(base::OnceClosure start_retry) override {
NOTREACHED_IN_MIGRATION();
}
const int stream_id_;
const int request_id_;

@ -154,7 +154,7 @@ class TestRendererServiceImpl : public mojom::TestService {
std::move(callback).Run();
}
void WriteToPreloadedPipe() override { NOTREACHED(); }
void WriteToPreloadedPipe() override { NOTREACHED_IN_MIGRATION(); }
mojo::Receiver<mojom::TestService> receiver_;
};

@ -129,7 +129,7 @@ class TestObserver : public FidoRequestHandlerBase::Observer {
void OnSampleCollected(int remaining_samples) override {}
void FinishCollectToken() override { NOTREACHED(); }
void FinishCollectToken() override { NOTREACHED_IN_MIGRATION(); }
private:
TransportAvailabilityNotificationReceiver

@ -138,7 +138,7 @@ class FakeSerialPort : public device::mojom::SerialPort {
NOTREACHED_IN_MIGRATION();
}
void Drain(DrainCallback callback) override { NOTREACHED(); }
void Drain(DrainCallback callback) override { NOTREACHED_IN_MIGRATION(); }
void GetControlSignals(GetControlSignalsCallback callback) override {
auto signals = device::mojom::SerialPortControlSignals::New();

@ -70,7 +70,7 @@ class TestUdpEchoServer::Core {
udp_listener_receiver_.BindNewPipeAndPassRemote());
server_socket_.set_disconnect_handler(
base::BindLambdaForTesting([]() { NOTREACHED(); }));
base::BindLambdaForTesting([]() { NOTREACHED_IN_MIGRATION(); }));
net::IPEndPoint server_addr(net::IPAddress::IPv4Localhost(), 0);
auto server_helper =

@ -72,7 +72,7 @@ class FakeDelegate : public blink::URLLoaderThrottle::Delegate {
cancel_error_code_ = error_code;
cancel_custom_reason_ = std::string(custom_reason);
}
void Resume() override { NOTREACHED(); }
void Resume() override { NOTREACHED_IN_MIGRATION(); }
void UpdateDeferredResponseHead(
network::mojom::URLResponseHeadPtr new_response_head,

@ -18,8 +18,10 @@ class FakeCommandBuffer : public CommandBuffer {
NOTREACHED_IN_MIGRATION();
return State();
}
void Flush(int32_t put_offset) override { NOTREACHED(); }
void OrderingBarrier(int32_t put_offset) override { NOTREACHED(); }
void Flush(int32_t put_offset) override { NOTREACHED_IN_MIGRATION(); }
void OrderingBarrier(int32_t put_offset) override {
NOTREACHED_IN_MIGRATION();
}
State WaitForTokenInRange(int32_t start, int32_t end) override {
NOTREACHED_IN_MIGRATION();
@ -31,7 +33,9 @@ class FakeCommandBuffer : public CommandBuffer {
NOTREACHED_IN_MIGRATION();
return State();
}
void SetGetBuffer(int32_t transfer_buffer_id) override { NOTREACHED(); }
void SetGetBuffer(int32_t transfer_buffer_id) override {
NOTREACHED_IN_MIGRATION();
}
scoped_refptr<gpu::Buffer> CreateTransferBuffer(
uint32_t size,
int32_t* id,

@ -138,13 +138,13 @@ class WebGPUDecoderImpl final : public WebGPUDecoder {
}
Capabilities GetCapabilities() override { return {}; }
GLCapabilities GetGLCapabilities() override { return {}; }
void RestoreGlobalState() const override { NOTREACHED(); }
void ClearAllAttributes() const override { NOTREACHED(); }
void RestoreAllAttributes() const override { NOTREACHED(); }
void RestoreGlobalState() const override { NOTREACHED_IN_MIGRATION(); }
void ClearAllAttributes() const override { NOTREACHED_IN_MIGRATION(); }
void RestoreAllAttributes() const override { NOTREACHED_IN_MIGRATION(); }
void RestoreState(const gles2::ContextState* prev_state) override {
NOTREACHED_IN_MIGRATION();
}
void RestoreActiveTexture() const override { NOTREACHED(); }
void RestoreActiveTexture() const override { NOTREACHED_IN_MIGRATION(); }
void RestoreAllTextureUnitAndSamplerBindings(
const gles2::ContextState* prev_state) const override {
NOTREACHED_IN_MIGRATION();
@ -152,17 +152,27 @@ class WebGPUDecoderImpl final : public WebGPUDecoder {
void RestoreActiveTextureUnitBinding(unsigned int target) const override {
NOTREACHED_IN_MIGRATION();
}
void RestoreBufferBinding(unsigned int target) override { NOTREACHED(); }
void RestoreBufferBindings() const override { NOTREACHED(); }
void RestoreFramebufferBindings() const override { NOTREACHED(); }
void RestoreRenderbufferBindings() override { NOTREACHED(); }
void RestoreProgramBindings() const override { NOTREACHED(); }
void RestoreTextureState(unsigned service_id) override { NOTREACHED(); }
void RestoreBufferBinding(unsigned int target) override {
NOTREACHED_IN_MIGRATION();
}
void RestoreBufferBindings() const override { NOTREACHED_IN_MIGRATION(); }
void RestoreFramebufferBindings() const override {
NOTREACHED_IN_MIGRATION();
}
void RestoreRenderbufferBindings() override { NOTREACHED_IN_MIGRATION(); }
void RestoreProgramBindings() const override { NOTREACHED_IN_MIGRATION(); }
void RestoreTextureState(unsigned service_id) override {
NOTREACHED_IN_MIGRATION();
}
void RestoreTextureUnitBindings(unsigned unit) const override {
NOTREACHED_IN_MIGRATION();
}
void RestoreVertexAttribArray(unsigned index) override { NOTREACHED(); }
void RestoreAllExternalTextureBindingsIfNeeded() override { NOTREACHED(); }
void RestoreVertexAttribArray(unsigned index) override {
NOTREACHED_IN_MIGRATION();
}
void RestoreAllExternalTextureBindingsIfNeeded() override {
NOTREACHED_IN_MIGRATION();
}
QueryManager* GetQueryManager() override {
NOTREACHED_IN_MIGRATION();
return nullptr;
@ -171,7 +181,7 @@ class WebGPUDecoderImpl final : public WebGPUDecoder {
base::OnceClosure callback) override {
NOTREACHED_IN_MIGRATION();
}
void CancelAllQueries() override { NOTREACHED(); }
void CancelAllQueries() override { NOTREACHED_IN_MIGRATION(); }
gles2::GpuFenceManager* GetGpuFenceManager() override {
NOTREACHED_IN_MIGRATION();
return nullptr;

@ -182,7 +182,8 @@ class CompressedTextureTest : public ::testing::TestWithParam<GLenum> {
case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT: return LoadTextureDXT1(true);
case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT: return LoadTextureDXT3();
case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT: return LoadTextureDXT5();
default: NOTREACHED();
default:
NOTREACHED_IN_MIGRATION();
}
return 0;
}

@ -266,7 +266,7 @@ class RecordReplayContext : public GpuControl {
NOTREACHED_IN_MIGRATION();
}
void CancelAllQueries() override { NOTREACHED(); }
void CancelAllQueries() override { NOTREACHED_IN_MIGRATION(); }
void CreateGpuFence(uint32_t gpu_fence_id, ClientGpuFence source) override {
NOTREACHED_IN_MIGRATION();
@ -278,9 +278,9 @@ class RecordReplayContext : public GpuControl {
NOTREACHED_IN_MIGRATION();
}
void SetLock(base::Lock*) override { NOTREACHED(); }
void SetLock(base::Lock*) override { NOTREACHED_IN_MIGRATION(); }
void EnsureWorkVisible() override { NOTREACHED(); }
void EnsureWorkVisible() override { NOTREACHED_IN_MIGRATION(); }
gpu::CommandBufferNamespace GetNamespaceID() const override {
return gpu::CommandBufferNamespace::INVALID;
@ -290,7 +290,7 @@ class RecordReplayContext : public GpuControl {
return gpu::CommandBufferId();
}
void FlushPendingWork() override { NOTREACHED(); }
void FlushPendingWork() override { NOTREACHED_IN_MIGRATION(); }
uint64_t GenerateFenceSyncRelease() override {
NOTREACHED_IN_MIGRATION();

@ -37,7 +37,9 @@ class FaviconUrlObserver : public WebStateObserver {
favicon_url_candidates_ = candidates;
favicon_url_updated_ = true;
}
void WebStateDestroyed(WebState* web_state) override { NOTREACHED(); }
void WebStateDestroyed(WebState* web_state) override {
NOTREACHED_IN_MIGRATION();
}
private:
bool favicon_url_updated_ = false;

@ -67,7 +67,9 @@ class FailedWebStateObserver : public web::WebStateObserver {
}
}
void WebStateDestroyed(web::WebState* web_state) override { NOTREACHED(); }
void WebStateDestroyed(web::WebState* web_state) override {
NOTREACHED_IN_MIGRATION();
}
bool did_finish() const { return did_finish_; }
web::HttpsUpgradeType failed_https_upgrade_type() const {

@ -49,7 +49,9 @@ class IntTestWebStateObserver : public WebStateObserver {
page_loaded_ = true;
}
void WebStateDestroyed(web::WebState* web_state) override { NOTREACHED(); }
void WebStateDestroyed(web::WebState* web_state) override {
NOTREACHED_IN_MIGRATION();
}
private:
GURL expected_url_;

@ -40,7 +40,9 @@ class WebStateObserverMock : public web::WebStateObserver {
WebStateObserverMock& operator=(const WebStateObserverMock&) = delete;
MOCK_METHOD2(PermissionStateChanged, void(web::WebState*, web::Permission));
void WebStateDestroyed(web::WebState* web_state) override { NOTREACHED(); }
void WebStateDestroyed(web::WebState* web_state) override {
NOTREACHED_IN_MIGRATION();
}
};
// Web client that simulates prerendering for testing purpose.

@ -1222,7 +1222,9 @@ TEST_F(CRWWebControllerTitleTest, TitleChange) {
int title_change_count() { return title_change_count_; }
// WebStateObserver overrides:
void TitleWasSet(WebState* web_state) override { title_change_count_++; }
void WebStateDestroyed(WebState* web_state) override { NOTREACHED(); }
void WebStateDestroyed(WebState* web_state) override {
NOTREACHED_IN_MIGRATION();
}
private:
int title_change_count_ = 0;

@ -724,7 +724,9 @@ class WebStateObserverMock : public WebStateObserver {
MOCK_METHOD1(DidStopLoading, void(WebState*));
MOCK_METHOD2(PageLoaded, void(WebState*, PageLoadCompletionStatus));
MOCK_METHOD1(DidChangeBackForwardState, void(WebState*));
void WebStateDestroyed(WebState* web_state) override { NOTREACHED(); }
void WebStateDestroyed(WebState* web_state) override {
NOTREACHED_IN_MIGRATION();
}
};
// Mocks WebStateObserver navigation callbacks, including TitleWasSet.
@ -744,7 +746,9 @@ class WebStateObserverWithTitleMock : public WebStateObserver {
MOCK_METHOD2(PageLoaded, void(WebState*, PageLoadCompletionStatus));
MOCK_METHOD1(DidChangeBackForwardState, void(WebState*));
MOCK_METHOD1(TitleWasSet, void(WebState*));
void WebStateDestroyed(WebState* web_state) override { NOTREACHED(); }
void WebStateDestroyed(WebState* web_state) override {
NOTREACHED_IN_MIGRATION();
}
};
// Mocks WebStatePolicyDecider decision callbacks.

@ -66,11 +66,17 @@ Channel::AssociatedInterfaceSupport* Channel::GetAssociatedInterfaceSupport() {
return nullptr;
}
void Channel::Pause() { NOTREACHED(); }
void Channel::Pause() {
NOTREACHED_IN_MIGRATION();
}
void Channel::Unpause(bool flush) { NOTREACHED(); }
void Channel::Unpause(bool flush) {
NOTREACHED_IN_MIGRATION();
}
void Channel::Flush() { NOTREACHED(); }
void Channel::Flush() {
NOTREACHED_IN_MIGRATION();
}
void Channel::SetUrgentMessageObserver(UrgentMessageObserver* observer) {
// Ignored for non-mojo channels.

@ -275,7 +275,7 @@ class ListenerThatBindsATestStructPasser : public IPC::Listener,
void OnChannelConnected(int32_t peer_pid) override {}
void OnChannelError() override { NOTREACHED(); }
void OnChannelError() override { NOTREACHED_IN_MIGRATION(); }
void OnAssociatedInterfaceRequest(
const std::string& interface_name,
@ -288,7 +288,7 @@ class ListenerThatBindsATestStructPasser : public IPC::Listener,
private:
// IPC::mojom::TestStructPasser:
void Pass(IPC::mojom::TestStructPtr) override { NOTREACHED(); }
void Pass(IPC::mojom::TestStructPtr) override { NOTREACHED_IN_MIGRATION(); }
mojo::AssociatedReceiver<IPC::mojom::TestStructPasser> receiver_{this};
};
@ -313,7 +313,7 @@ class ListenerThatExpectsNoError : public IPC::Listener {
std::move(connect_closure_).Run();
}
void OnChannelError() override { NOTREACHED(); }
void OnChannelError() override { NOTREACHED_IN_MIGRATION(); }
private:
base::OnceClosure connect_closure_;
@ -797,7 +797,9 @@ class ListenerWithSimpleProxyAssociatedInterface
std::move(callback).Run(next_expected_value_);
}
void RequestValue(RequestValueCallback callback) override { NOTREACHED(); }
void RequestValue(RequestValueCallback callback) override {
NOTREACHED_IN_MIGRATION();
}
void RequestQuit(RequestQuitCallback callback) override {
std::move(callback).Run();

@ -396,10 +396,10 @@
} \
break;
#define IPC_MESSAGE_UNHANDLED_ERROR() \
IPC_MESSAGE_UNHANDLED(NOTREACHED() << \
"Invalid message with type = " << \
ipc_message__.type())
#define IPC_MESSAGE_UNHANDLED_ERROR() \
IPC_MESSAGE_UNHANDLED(NOTREACHED_IN_MIGRATION() \
<< "Invalid message with type = " \
<< ipc_message__.type())
#define IPC_END_MESSAGE_MAP() \
} \

@ -147,7 +147,7 @@ class Worker : public Listener, public Sender {
SyncChannel* channel() { return channel_.get(); }
// Functions for derived classes to implement if they wish.
virtual void Run() { }
virtual void OnAnswer(int* answer) { NOTREACHED(); }
virtual void OnAnswer(int* answer) { NOTREACHED_IN_MIGRATION(); }
virtual void OnAnswerDelay(Message* reply_msg) {
// The message handler map below can only take one entry for
// SyncChannelTestMsg_AnswerToLife, so since some classes want
@ -159,7 +159,7 @@ class Worker : public Listener, public Sender {
SyncChannelTestMsg_AnswerToLife::WriteReplyParams(reply_msg, answer);
Send(reply_msg);
}
virtual void OnDouble(int in, int* out) { NOTREACHED(); }
virtual void OnDouble(int in, int* out) { NOTREACHED_IN_MIGRATION(); }
virtual void OnDoubleDelay(int in, Message* reply_msg) {
int result;
OnDouble(in, &result);

@ -296,8 +296,8 @@ class DecoderSelectorTest : public ::testing::Test {
DecoderSelectorTest(const DecoderSelectorTest&) = delete;
DecoderSelectorTest& operator=(const DecoderSelectorTest&) = delete;
void OnWaiting(WaitingReason reason) { NOTREACHED(); }
void OnOutput(scoped_refptr<Output> output) { NOTREACHED(); }
void OnWaiting(WaitingReason reason) { NOTREACHED_IN_MIGRATION(); }
void OnOutput(scoped_refptr<Output> output) { NOTREACHED_IN_MIGRATION(); }
MOCK_METHOD0_T(NoDecoderSelected, void());
MOCK_METHOD1_T(OnDecoderSelected, void(int));

@ -144,8 +144,8 @@ class PipelineControllerTest : public ::testing::Test, public Pipeline::Client {
void OnResumed() { was_resumed_ = true; }
// Pipeline::Client overrides
void OnError(PipelineStatus status) override { NOTREACHED(); }
void OnFallback(PipelineStatus status) override { NOTREACHED(); }
void OnError(PipelineStatus status) override { NOTREACHED_IN_MIGRATION(); }
void OnFallback(PipelineStatus status) override { NOTREACHED_IN_MIGRATION(); }
void OnEnded() override {}
void OnMetadata(const PipelineMetadata& metadata) override {}
void OnBufferingStateChange(BufferingState state,

@ -420,7 +420,7 @@ class FakeClientNativePixmap : public gfx::ClientNativePixmap {
// gfx::ClientNativePixmap implementation.
bool Map() override { NOTREACHED_NORETURN(); }
void Unmap() override { NOTREACHED(); }
void Unmap() override { NOTREACHED_IN_MIGRATION(); }
size_t GetNumberOfPlanes() const override { NOTREACHED_NORETURN(); }
void* GetMemoryAddress(size_t plane) const override { NOTREACHED_NORETURN(); }
int GetStride(size_t plane) const override { NOTREACHED_NORETURN(); }

@ -27,7 +27,7 @@ using sandbox::syscall_broker::BrokerFilePermission;
// chrome/browser/ash/arc/video/gpu_arc_video_service_host.cc depends on it and
// that file is built for ash-chrome regardless of VA-API/V4L2. That means that
// bots like linux-chromeos-rel end up compiling this presandbox hook (thus the
// NOTREACHED()s in some places here).
// NOTREACHED_IN_MIGRATION()s in some places here).
namespace media {
namespace {

@ -233,7 +233,7 @@ class AudioRendererImplTest : public ::testing::Test,
// RendererClient implementation.
MOCK_METHOD1(OnError, void(PipelineStatus));
void OnFallback(PipelineStatus status) override { NOTREACHED(); }
void OnFallback(PipelineStatus status) override { NOTREACHED_IN_MIGRATION(); }
void OnEnded() override {
CHECK(!ended_);
ended_ = true;

@ -112,7 +112,9 @@ struct IpczMessage : public Channel::Message {
~IpczMessage() override = default;
// Channel::Message:
void SetHandles(std::vector<PlatformHandle>) override { NOTREACHED(); }
void SetHandles(std::vector<PlatformHandle>) override {
NOTREACHED_IN_MIGRATION();
}
void SetHandles(std::vector<PlatformHandleInTransit>) override {
NOTREACHED_IN_MIGRATION();
}

@ -121,8 +121,10 @@ class NeverSerializedMessage : public TestMessageBase {
void GetSerializedSize(size_t* num_bytes, size_t* num_handles) override {
NOTREACHED_IN_MIGRATION();
}
void SerializeHandles(MojoHandle* handles) override { NOTREACHED(); }
void SerializePayload(void* buffer) override { NOTREACHED(); }
void SerializeHandles(MojoHandle* handles) override {
NOTREACHED_IN_MIGRATION();
}
void SerializePayload(void* buffer) override { NOTREACHED_IN_MIGRATION(); }
base::OnceClosure destruction_callback_;
};

@ -871,8 +871,8 @@ TEST_F(TrapTest, MultipleTriggers) {
// Add a trigger whose condition is always satisfied so we can't arm. Arming
// should fail with only this new watch's information.
uintptr_t writable_c_context =
helper.CreateContext([](const MojoTrapEvent&) { NOTREACHED(); });
uintptr_t writable_c_context = helper.CreateContext(
[](const MojoTrapEvent&) { NOTREACHED_IN_MIGRATION(); });
MojoHandle c, d;
CreateMessagePipe(&c, &d);
@ -1017,7 +1017,8 @@ TEST_F(TrapTest, ImplicitRemoveOtherTriggerWithinEventHandler) {
EXPECT_EQ(MOJO_RESULT_OK, helper.CreateTrap(&t));
uintptr_t readable_a_context = helper.CreateContextWithCancel(
[](const MojoTrapEvent&) { NOTREACHED(); }, [&] { wait.Signal(); });
[](const MojoTrapEvent&) { NOTREACHED_IN_MIGRATION(); },
[&] { wait.Signal(); });
uintptr_t readable_c_context =
helper.CreateContext([&](const MojoTrapEvent& event) {
@ -1080,8 +1081,8 @@ TEST_F(TrapTest, ExplicitRemoveOtherTriggerWithinEventHandler) {
MojoHandle t;
EXPECT_EQ(MOJO_RESULT_OK, helper.CreateTrap(&t));
uintptr_t readable_a_context =
helper.CreateContext([](const MojoTrapEvent&) { NOTREACHED(); });
uintptr_t readable_a_context = helper.CreateContext(
[](const MojoTrapEvent&) { NOTREACHED_IN_MIGRATION(); });
uintptr_t readable_c_context =
helper.CreateContext([&](const MojoTrapEvent& event) {

@ -141,7 +141,7 @@ class IntegerSenderImpl : public IntegerSender {
else
echo_handler_.Run(value, std::move(callback));
}
void Send(int32_t value) override { NOTREACHED(); }
void Send(int32_t value) override { NOTREACHED_IN_MIGRATION(); }
ReceiverType* receiver() { return &receiver_; }

@ -70,8 +70,9 @@ TEST_P(IdleTrackingTest, ControlMessagesDontExpectAck) {
TestServiceImpl impl(remote.BindNewPipeAndPassReceiver());
base::RunLoop loop;
remote.set_idle_handler(base::TimeDelta(),
base::BindRepeating([] { NOTREACHED(); }));
remote.set_idle_handler(base::TimeDelta(), base::BindRepeating([] {
NOTREACHED_IN_MIGRATION();
}));
remote.FlushAsyncForTesting(loop.QuitClosure());
EXPECT_EQ(0u, remote.GetNumUnackedMessagesForTesting());
loop.Run();
@ -105,8 +106,9 @@ TEST_P(IdleTrackingTest, PendingRepliesPreventIdling) {
TestServiceImpl impl(remote.BindNewPipeAndPassReceiver());
impl.HoldNextPingPong();
remote.set_idle_handler(base::TimeDelta(),
base::BindRepeating([] { NOTREACHED(); }));
remote.set_idle_handler(base::TimeDelta(), base::BindRepeating([] {
NOTREACHED_IN_MIGRATION();
}));
bool idle = false;
bool replied = false;
@ -162,8 +164,9 @@ TEST_P(IdleTrackingTest, OtherBoundReceiversPreventIdling) {
// First see that we can bind another receiver and that the Remote does not
// invoke its idle handler even though its number of unacked messages goes to
// zero.
remote.set_idle_handler(base::TimeDelta(),
base::BindRepeating([] { NOTREACHED(); }));
remote.set_idle_handler(base::TimeDelta(), base::BindRepeating([] {
NOTREACHED_IN_MIGRATION();
}));
Remote<mojom::KeepAlive> keepalive;
remote->BindKeepAlive(keepalive.BindNewPipeAndPassReceiver());
EXPECT_EQ(1u, remote.GetNumUnackedMessagesForTesting());
@ -214,8 +217,9 @@ TEST_P(IdleTrackingTest, SubInterfacesCanIdleSeparately) {
// First see that we can bind another receiver and that the Remote does not
// invoke its idle handler even though its number of unacked messages goes to
// zero.
remote.set_idle_handler(base::TimeDelta(),
base::BindRepeating([] { NOTREACHED(); }));
remote.set_idle_handler(base::TimeDelta(), base::BindRepeating([] {
NOTREACHED_IN_MIGRATION();
}));
Remote<mojom::KeepAlive> keepalive;
remote->BindKeepAlive(keepalive.BindNewPipeAndPassReceiver());
EXPECT_EQ(1u, remote.GetNumUnackedMessagesForTesting());

@ -520,8 +520,9 @@ TEST_P(ReceiverTest, CustomImplPointerType) {
{
// Attempt to dispatch another message after the WeakPtr is invalidated.
impl.set_ping_handler(base::BindRepeating([] { NOTREACHED(); }));
remote->Ping(base::BindOnce([] { NOTREACHED(); }));
impl.set_ping_handler(
base::BindRepeating([] { NOTREACHED_IN_MIGRATION(); }));
remote->Ping(base::BindOnce([] { NOTREACHED_IN_MIGRATION(); }));
// The receiver will close its end of the pipe which will trigger a
// disconnect on |remote|.

Some files were not shown because too many files have changed in this diff Show More