Skip to content

Instantly share code, notes, and snippets.

@goodov
Created June 14, 2022 13:08
Show Gist options
  • Save goodov/a62434bb5e940b2f9f6b26e711bdc638 to your computer and use it in GitHub Desktop.
Save goodov/a62434bb5e940b2f9f6b26e711bdc638 to your computer and use it in GitHub Desktop.
/* Copyright (c) 2022 The Brave Authors. All rights reserved.
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "content/child/runtime_features.h"
#define SetRuntimeFeaturesDefaultsAndUpdateFromArgs \
SetRuntimeFeaturesDefaultsAndUpdateFromArgs_ChromiumImpl
#include "src/content/child/runtime_features.cc"
#undef SetRuntimeFeaturesDefaultsAndUpdateFromArgs
namespace content {
void SetRuntimeFeaturesDefaultsAndUpdateFromArgs(
const base::CommandLine& command_line) {
SetRuntimeFeaturesDefaultsAndUpdateFromArgs_ChromiumImpl(command_line);
constexpr base::StringPiece kDisableBlinkFeatures[] = {
"SpeculationRulesPrefetchProxy",
};
for (const auto& disabled_feature : kDisableBlinkFeatures) {
WebRuntimeFeatures::EnableFeatureFromString(std::string(disabled_feature),
false);
}
ResolveInvalidConfigurations();
}
} // namespace content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment