87f7625c5d
* chore: bump chromium in DEPS to 96.0.4662.0 * chore: bump chromium in DEPS to 96.0.4663.0 * chore: update patches * [Extensions] Remove RuntimeData entirely https://chromium-review.googlesource.com/c/chromium/src/+/3177328 * Make helper macros behave consistently for //content/public UserData types https://chromium-review.googlesource.com/c/chromium/src/+/3198788 * Enabling sandboxing for the speech recognition service browser tests https://chromium-review.googlesource.com/c/chromium/src/+/3146090 * [devtools] Add 'RegisterPreference' host binding https://chromium-review.googlesource.com/c/chromium/src/+/3162281 * [Reland][Extensions]: Add persistAcrossSessions flag (scripting API) https://chromium-review.googlesource.com/c/chromium/src/+/3175161 * [Bluetooth] Add Passkey prompt dialog for bonding. https://chromium-review.googlesource.com/c/chromium/src/+/2841104 * Clipboard: Remove ReadImage path in browser https://chromium-review.googlesource.com/c/chromium/src/+/3194826 * Split printing metafile code into its own target. https://chromium-review.googlesource.com/c/chromium/src/+/3164925 * Cleanup unused DesktopMediaListObserver params https://chromium-review.googlesource.com/c/chromium/src/+/3179203 * Remove base::DictionaryValue::GetBinary https://chromium-review.googlesource.com/c/chromium/src/+/3201974 * Window Placement: change RWHV::GetDisplayList to GetScreenInfos https://chromium-review.googlesource.com/c/chromium/src/+/3138774 * Add a preview to the Tab Capture picker dialog https://chromium-review.googlesource.com/c/chromium/src/+/3045268 * Add service-based usage to update print settings https://chromium-review.googlesource.com/c/chromium/src/+/3155426 * chore: bump chromium in DEPS to 96.0.4664.2 * chore: update patches * chore: bump chromium in DEPS to 96.0.4664.4 * chore: update patches * chore: bump chromium in DEPS to 97.0.4666.0 * Revert "chore: bump chromium in DEPS to 97.0.4666.0" This reverts commit d73caae8ba4b39efc9b3ea4de52685b9c92ef3d0. * Reland "Block external protocol handler with sandbox." https://chromium-review.googlesource.com/c/chromium/src/+/3198263 * fixup for lint * Add CookiePartitionKeychain parameter to CookeManager.GetCookieList. https://chromium-review.googlesource.com/c/chromium/src/+/3206016 * Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry https://chromium-review.googlesource.com/c/chromium/src/+/3200392 * fixup Move ui/gfx/transform*,rrect*,mask_filter_info* into ui/gfx/geometry * ozone: //chrome/browser clean up from USE_X11 https://chromium-review.googlesource.com/c/chromium/src/+/3186490 * content: don't load v8 snapshot in browser process https://chromium-review.googlesource.com/c/chromium/src/+/3183394 * [devtools] Add 'RegisterPreference' host binding https://chromium-review.googlesource.com/c/chromium/src/+/3162281 * 3186491: Add 'devtools.sync_preferences' preference https://chromium-review.googlesource.com/c/chromium/src/+/3186491 * 2951147: DCHECK accessible names for focusable Views https://chromium-review.googlesource.com/c/chromium/src/+/2951147 * 3201014: Use real font size for calculation of SmallTextRatio https://chromium-review.googlesource.com/c/chromium/src/+/3201014 * fixup Clipboard: Remove ReadImage path in browser * chore: update patches * fix: disable PlzServiceWorker to fix custom protocol SW script loading Ref: https://chromium-review.googlesource.com/c/chromium/src/+/3199761 Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <jkleinsc@github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
62 lines
2.3 KiB
C++
62 lines
2.3 KiB
C++
// Copyright (c) 2019 GitHub, Inc.
|
|
// Use of this source code is governed by the MIT license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#include "electron/shell/browser/feature_list.h"
|
|
|
|
#include <string>
|
|
|
|
#include "base/base_switches.h"
|
|
#include "base/command_line.h"
|
|
#include "base/feature_list.h"
|
|
#include "base/metrics/field_trial.h"
|
|
#include "components/spellcheck/common/spellcheck_features.h"
|
|
#include "content/public/common/content_features.h"
|
|
#include "electron/buildflags/buildflags.h"
|
|
#include "media/base/media_switches.h"
|
|
#include "net/base/features.h"
|
|
#include "services/network/public/cpp/features.h"
|
|
|
|
namespace electron {
|
|
|
|
void InitializeFeatureList() {
|
|
auto* cmd_line = base::CommandLine::ForCurrentProcess();
|
|
auto enable_features =
|
|
cmd_line->GetSwitchValueASCII(::switches::kEnableFeatures);
|
|
auto disable_features =
|
|
cmd_line->GetSwitchValueASCII(::switches::kDisableFeatures);
|
|
// Disable creation of spare renderer process with site-per-process mode,
|
|
// it interferes with our process preference tracking for non sandboxed mode.
|
|
// Can be reenabled when our site instance policy is aligned with chromium
|
|
// when node integration is enabled.
|
|
disable_features +=
|
|
std::string(",") + features::kSpareRendererForSitePerProcess.name;
|
|
|
|
// PlzServiceWorker breaks fetching service worker scripts for custom
|
|
// protocols or chrome-extension protocols due to a change in the URL loader
|
|
// used to fetch the script.
|
|
// TODO(MarshallOfSound): Re-enable and fix?
|
|
disable_features += std::string(",") + features::kPlzServiceWorker.name;
|
|
|
|
#if !BUILDFLAG(ENABLE_PICTURE_IN_PICTURE)
|
|
disable_features += std::string(",") + media::kPictureInPicture.name;
|
|
#endif
|
|
|
|
#if defined(OS_WIN)
|
|
// Disable async spellchecker suggestions for Windows, which causes
|
|
// an empty suggestions list to be returned
|
|
disable_features +=
|
|
std::string(",") + spellcheck::kWinRetrieveSuggestionsOnlyOnDemand.name;
|
|
#endif
|
|
base::FeatureList::InitializeInstance(enable_features, disable_features);
|
|
}
|
|
|
|
void InitializeFieldTrials() {
|
|
auto* cmd_line = base::CommandLine::ForCurrentProcess();
|
|
auto force_fieldtrials =
|
|
cmd_line->GetSwitchValueASCII(::switches::kForceFieldTrials);
|
|
|
|
base::FieldTrialList::CreateTrialsFromString(force_fieldtrials);
|
|
}
|
|
|
|
} // namespace electron
|