Skip to content

Commit

Permalink
(#1005) Introduced #disable-ech flag
Browse files Browse the repository at this point in the history
  • Loading branch information
win32ss committed Nov 12, 2024
1 parent 8d5a6fe commit 00cae7e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
6 changes: 5 additions & 1 deletion chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11593,7 +11593,11 @@ const FeatureEntry kFeatureEntries[] = {
{"double-click-close-tab",
"Double Click to Close Tab",
"Enables double clicking a tab to close it.",
kOsDesktop, SINGLE_VALUE_TYPE("double-click-close-tab")}
kOsDesktop, SINGLE_VALUE_TYPE("double-click-close-tab")},
{"disable-ech", "Disable Encrypted ClientHello",
"Disables TLS Encrypted ClientHello support in special cases where it may prevent"
" the usage of some websites.", kOsAll,
SINGLE_VALUE_TYPE("disable-ech")}
// TODO: move all Supermium-specific flags to new source file.
// NOTE: Adding a new flag requires adding a corresponding entry to enum
// "LoginCustomFlags" in tools/metrics/histograms/enums.xml. See "Flag
Expand Down
6 changes: 6 additions & 0 deletions chrome/browser/ssl/ssl_config_service_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <string_view>
#include <vector>

#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/location.h"
Expand Down Expand Up @@ -224,6 +225,11 @@ network::mojom::SSLConfigPtr SSLConfigServiceManager::GetSSLConfigFromPrefs()

config->ech_enabled = ech_enabled_.GetValue();

if (base::CommandLine::ForCurrentProcess()->HasSwitch(
"disable-ech")) {
config->ech_enabled = false;
}

if (post_quantum_enabled_.IsManaged()) {
config->post_quantum_override = post_quantum_enabled_.GetValue()
? network::mojom::OptionalBool::kTrue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -905,8 +905,8 @@ std::optional<UserAgentMetadata> LocalFrameClientImpl::UserAgentMetadata() {
probe::ApplyUserAgentMetadataOverride(probe::ToCoreProbeSink(document),
&user_agent_metadata);

if(user_agent_metadata->platform.empty())
return std::nullopt;
// if(user_agent_metadata->platform.empty())
// return std::nullopt;

return user_agent_metadata;
}
Expand Down

0 comments on commit 00cae7e

Please sign in to comment.