cef
cef copied to clipboard
chrome: “Relaunch” button in the Experiments bubble doesn't work
Describe the bug The chrome Experiments bubble is available in local developer builds (disabled in official builds). Clicking the "Relaunch" button after modifying experiments does nothing on Windows and crashes on MacOS.
Expected behavior The client should get a callback for relaunching the app.
Screenshots
Versions (please complete the following information):
- OS: All
- CEF Version: M116+
Additional context Does the problem reproduce with the cefclient or cefsimple sample application at the same version? Yes
Does the problem reproduce with Google Chrome at the same version? No
The chrome Experiments bubble is available in local developer builds (https://github.com/chromiumembedded/cef/issues/3560 in official builds)
Looks like the Experiments bubble is back in M117 official builds due to this commit (after disappearing in M116).
Here's example code for disabling experiments that can be added in OnRequestContextInitialized (M117+):
// Disable Chrome Labs experimental features.
const char kBrowserLabsEnabled[] = "browser_labs_enabled";
if (context->CanSetPreference(kBrowserLabsEnabled)) {
auto value = CefValue::Create();
value->SetBool(false);
CefString error;
if (!context->SetPreference(kBrowserLabsEnabled, value, error)) {
LOG(ERROR) << "Failed to set preference " << kBrowserLabsEnabled << "; " << error.ToString().c_str();
}
}