Skip to content

Commit

Permalink
Allow insecure websocket in QA builds (#4614)
Browse files Browse the repository at this point in the history
Also fixes how the COBALT_IS_RELEASE_BUILD buildflag is set.

b/377410179
  • Loading branch information
andrewsavage1 authored Dec 19, 2024
1 parent 1322f53 commit 768aefe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/build_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion cobalt/build/configs/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
}
}
4 changes: 2 additions & 2 deletions cobalt/cobalt_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 768aefe

Please sign in to comment.