cef icon indicating copy to clipboard operation
cef copied to clipboard

chrome: “Relaunch” button in the Experiments bubble doesn't work

Open magreenblatt opened this issue 1 year ago • 2 comments

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 image

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

magreenblatt avatar Aug 31 '23 18:08 magreenblatt

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).

magreenblatt avatar Oct 04 '23 18:10 magreenblatt

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();
      }
    }

magreenblatt avatar Oct 04 '23 18:10 magreenblatt