From 768aefe07ae80c25c62f358fa5725955800dc200 Mon Sep 17 00:00:00 2001 From: Andrew Savage Date: Thu, 19 Dec 2024 15:15:09 -0500 Subject: [PATCH] Allow insecure websocket in QA builds (#4614) Also fixes how the COBALT_IS_RELEASE_BUILD buildflag is set. b/377410179 --- build/build_config.h | 2 +- cobalt/build/configs/BUILD.gn | 2 +- cobalt/cobalt_content_browser_client.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/build_config.h b/build/build_config.h index 4d7d0d98434..0a6d93b878b 100644 --- a/build/build_config.h +++ b/build/build_config.h @@ -284,7 +284,7 @@ #define BUILDFLAG_INTERNAL_MODULAR_BUILD() (0) #endif -#if defined(COBALT_IS_RELEASE_BUILD) +#if defined(ENABLE_BUILDFLAG_COBALT_IS_RELEASE_BUILD) #define BUILDFLAG_INTERNAL_COBALT_IS_RELEASE_BUILD() (1) #else #define BUILDFLAG_INTERNAL_COBALT_IS_RELEASE_BUILD() (0) diff --git a/cobalt/build/configs/BUILD.gn b/cobalt/build/configs/BUILD.gn index 81f47ec01aa..c731b81109d 100644 --- a/cobalt/build/configs/BUILD.gn +++ b/cobalt/build/configs/BUILD.gn @@ -55,6 +55,6 @@ config("buildflag_defines") { defines += [ "ENABLE_BUILDFLAG_MODULAR_BUILD" ] } if (cobalt_is_release_build) { - defines += [ "COBALT_IS_RELEASE_BUILD" ] + defines += [ "ENABLE_BUILDFLAG_COBALT_IS_RELEASE_BUILD" ] } } diff --git a/cobalt/cobalt_content_browser_client.cc b/cobalt/cobalt_content_browser_client.cc index 11fbc9641bc..8b612b35987 100644 --- a/cobalt/cobalt_content_browser_client.cc +++ b/cobalt/cobalt_content_browser_client.cc @@ -83,11 +83,11 @@ blink::UserAgentMetadata CobaltContentBrowserClient::GetUserAgentMetadata() { void CobaltContentBrowserClient::OverrideWebkitPrefs( content::WebContents* web_contents, blink::web_pref::WebPreferences* prefs) { -#if !defined(OFFICIAL_BUILD) +#if !defined(COBALT_IS_RELEASE_BUILD) // Allow creating a ws: connection on a https: page to allow current // testing set up. See b/377410179. prefs->allow_running_insecure_content = true; -#endif // !defined(OFFICIAL_BUILD) +#endif // !defined(COBALT_IS_RELEASE_BUILD) content::ShellContentBrowserClient::OverrideWebkitPrefs(web_contents, prefs); }