Commit ed0a4090 authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

Suppress a few -Wunreachable-code warnings on macOS.

No behavior change.

Bug: 346399
Change-Id: Ia658bb2a3ba42f7da364688691bd926bb0c0bbb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2115783
Commit-Queue: Nico Weber <thakis@chromium.org>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarRobert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/master@{#752581}
parent 65520792
...@@ -99,9 +99,7 @@ void BrowserCloseManager::CheckForDownloadsInProgress() { ...@@ -99,9 +99,7 @@ void BrowserCloseManager::CheckForDownloadsInProgress() {
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// Mac has its own in-progress downloads prompt in app_controller_mac.mm. // Mac has its own in-progress downloads prompt in app_controller_mac.mm.
CloseBrowsers(); CloseBrowsers();
return; #else
#endif
int download_count = int download_count =
DownloadCoreService::NonMaliciousDownloadCountAllProfiles(); DownloadCoreService::NonMaliciousDownloadCountAllProfiles();
if (download_count == 0) { if (download_count == 0) {
...@@ -112,6 +110,7 @@ void BrowserCloseManager::CheckForDownloadsInProgress() { ...@@ -112,6 +110,7 @@ void BrowserCloseManager::CheckForDownloadsInProgress() {
ConfirmCloseWithPendingDownloads( ConfirmCloseWithPendingDownloads(
download_count, download_count,
base::Bind(&BrowserCloseManager::OnReportDownloadsCancellable, this)); base::Bind(&BrowserCloseManager::OnReportDownloadsCancellable, this));
#endif
} }
void BrowserCloseManager::ConfirmCloseWithPendingDownloads( void BrowserCloseManager::ConfirmCloseWithPendingDownloads(
......
...@@ -43,10 +43,8 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest, ...@@ -43,10 +43,8 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest,
StoragePartitionGetNetworkContext) { StoragePartitionGetNetworkContext) {
if (content::IsInProcessNetworkService()) if (content::IsInProcessNetworkService())
return; return;
#if defined(OS_MACOSX)
// |NetworkServiceTestHelper| doesn't work on browser_tests on macOS. // |NetworkServiceTestHelper| doesn't work on browser_tests on macOS.
return; #if !defined(OS_MACOSX)
#endif
StoragePartition* partition = StoragePartition* partition =
BrowserContext::GetDefaultStoragePartition(browser()->profile()); BrowserContext::GetDefaultStoragePartition(browser()->profile());
...@@ -65,6 +63,7 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest, ...@@ -65,6 +63,7 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest,
EXPECT_NE(old_network_context, partition->GetNetworkContext()); EXPECT_NE(old_network_context, partition->GetNetworkContext());
EXPECT_EQ(net::OK, EXPECT_EQ(net::OK,
LoadBasicRequest(partition->GetNetworkContext(), GetTestURL())); LoadBasicRequest(partition->GetNetworkContext(), GetTestURL()));
#endif
} }
// Make sure |SystemNetworkContextManager::GetContext()| returns valid interface // Make sure |SystemNetworkContextManager::GetContext()| returns valid interface
...@@ -73,10 +72,8 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest, ...@@ -73,10 +72,8 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest,
SystemNetworkContextManagerGetContext) { SystemNetworkContextManagerGetContext) {
if (content::IsInProcessNetworkService()) if (content::IsInProcessNetworkService())
return; return;
#if defined(OS_MACOSX)
// |NetworkServiceTestHelper| doesn't work on browser_tests on macOS. // |NetworkServiceTestHelper| doesn't work on browser_tests on macOS.
return; #if !defined(OS_MACOSX)
#endif
SystemNetworkContextManager* system_network_context_manager = SystemNetworkContextManager* system_network_context_manager =
g_browser_process->system_network_context_manager(); g_browser_process->system_network_context_manager();
...@@ -96,6 +93,7 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest, ...@@ -96,6 +93,7 @@ IN_PROC_BROWSER_TEST_F(ChromeNetworkServiceRestartBrowserTest,
EXPECT_EQ(net::OK, EXPECT_EQ(net::OK,
LoadBasicRequest(system_network_context_manager->GetContext(), LoadBasicRequest(system_network_context_manager->GetContext(),
GetTestURL())); GetTestURL()));
#endif
} }
} // namespace content } // namespace content
...@@ -818,8 +818,7 @@ base::string16 Browser::GetWindowTitleFromWebContents( ...@@ -818,8 +818,7 @@ base::string16 Browser::GetWindowTitleFromWebContents(
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
// On Mac, we don't want to suffix the page title with the application name. // On Mac, we don't want to suffix the page title with the application name.
return title; return title;
#endif #else
// If there is no title and this is an app, fall back on the app name. This // If there is no title and this is an app, fall back on the app name. This
// ensures that the native window gets a title which is important for a11y, // ensures that the native window gets a title which is important for a11y,
// for example the window selector uses the Aura window title. // for example the window selector uses the Aura window title.
...@@ -836,6 +835,7 @@ base::string16 Browser::GetWindowTitleFromWebContents( ...@@ -836,6 +835,7 @@ base::string16 Browser::GetWindowTitleFromWebContents(
? l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT, ? l10n_util::GetStringFUTF16(IDS_BROWSER_WINDOW_TITLE_FORMAT,
title) title)
: title; : title;
#endif
} }
// static // static
......
...@@ -1107,8 +1107,7 @@ const DrawQuad* GLRenderer::CanPassBeDrawnDirectly(const RenderPass* pass) { ...@@ -1107,8 +1107,7 @@ const DrawQuad* GLRenderer::CanPassBeDrawnDirectly(const RenderPass* pass) {
// On Macs, this path can sometimes lead to all black output. // On Macs, this path can sometimes lead to all black output.
// TODO(enne): investigate this and remove this hack. // TODO(enne): investigate this and remove this hack.
return nullptr; return nullptr;
#endif #else
// Can only collapse a single tile quad. // Can only collapse a single tile quad.
if (pass->quad_list.size() != 1) if (pass->quad_list.size() != 1)
return nullptr; return nullptr;
...@@ -1151,6 +1150,7 @@ const DrawQuad* GLRenderer::CanPassBeDrawnDirectly(const RenderPass* pass) { ...@@ -1151,6 +1150,7 @@ const DrawQuad* GLRenderer::CanPassBeDrawnDirectly(const RenderPass* pass) {
return nullptr; return nullptr;
return tile_quad; return tile_quad;
#endif
} }
void GLRenderer::DrawRenderPassQuad(const RenderPassDrawQuad* quad, void GLRenderer::DrawRenderPassQuad(const RenderPassDrawQuad* quad,
......
...@@ -96,11 +96,8 @@ TEST_F(HTMLCanvasElementModuleTest, TransferControlToOffscreen) { ...@@ -96,11 +96,8 @@ TEST_F(HTMLCanvasElementModuleTest, TransferControlToOffscreen) {
// Verifies that a desynchronized canvas has the appropriate opacity/blending // Verifies that a desynchronized canvas has the appropriate opacity/blending
// information sent to the CompositorFrameSink. // information sent to the CompositorFrameSink.
TEST_P(HTMLCanvasElementModuleTest, LowLatencyCanvasCompositorFrameOpacity) { TEST_P(HTMLCanvasElementModuleTest, LowLatencyCanvasCompositorFrameOpacity) {
#if defined(OS_MACOSX)
// TODO(crbug.com/922218): enable desynchronized on Mac. // TODO(crbug.com/922218): enable desynchronized on Mac.
return; #if !defined(OS_MACOSX)
#endif
// This test relies on GpuMemoryBuffers being supported and enabled for low // This test relies on GpuMemoryBuffers being supported and enabled for low
// latency canvas. The latter is true only on ChromeOS in production. // latency canvas. The latter is true only on ChromeOS in production.
ScopedTestingPlatformSupport<LowLatencyTestPlatform> platform; ScopedTestingPlatformSupport<LowLatencyTestPlatform> platform;
...@@ -165,6 +162,7 @@ TEST_P(HTMLCanvasElementModuleTest, LowLatencyCanvasCompositorFrameOpacity) { ...@@ -165,6 +162,7 @@ TEST_P(HTMLCanvasElementModuleTest, LowLatencyCanvasCompositorFrameOpacity) {
platform->RunUntilIdle(); platform->RunUntilIdle();
SharedGpuContext::ResetForTesting(); SharedGpuContext::ResetForTesting();
#endif
} }
INSTANTIATE_TEST_SUITE_P(All, HTMLCanvasElementModuleTest, Values(true, false)); INSTANTIATE_TEST_SUITE_P(All, HTMLCanvasElementModuleTest, Values(true, false));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment