Linux: Fix NetworkService startup assertion in FeatureList::InitializeInstance (see issue #2622).
This commit is contained in:
parent
8a4f4bff9b
commit
cc80175e89
|
@ -21,6 +21,7 @@
|
||||||
#include "components/net_log/chrome_net_log.h"
|
#include "components/net_log/chrome_net_log.h"
|
||||||
#include "components/net_log/net_export_file_writer.h"
|
#include "components/net_log/net_export_file_writer.h"
|
||||||
#include "components/prefs/pref_service.h"
|
#include "components/prefs/pref_service.h"
|
||||||
|
#include "content/browser/startup_helper.h"
|
||||||
#include "content/public/common/content_switches.h"
|
#include "content/public/common/content_switches.h"
|
||||||
#include "services/network/public/cpp/network_switches.h"
|
#include "services/network/public/cpp/network_switches.h"
|
||||||
#include "services/network/public/cpp/shared_url_loader_factory.h"
|
#include "services/network/public/cpp/shared_url_loader_factory.h"
|
||||||
|
@ -41,6 +42,9 @@ void ChromeBrowserProcessStub::Initialize() {
|
||||||
DCHECK(!context_initialized_);
|
DCHECK(!context_initialized_);
|
||||||
DCHECK(!shutdown_);
|
DCHECK(!shutdown_);
|
||||||
|
|
||||||
|
// Initialize this early before any code tries to check feature flags.
|
||||||
|
content::SetUpFieldTrialsAndFeatureList();
|
||||||
|
|
||||||
const CefSettings& settings = CefContext::Get()->settings();
|
const CefSettings& settings = CefContext::Get()->settings();
|
||||||
const base::FilePath& cache_path =
|
const base::FilePath& cache_path =
|
||||||
base::FilePath(CefString(&settings.cache_path));
|
base::FilePath(CefString(&settings.cache_path));
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include "base/threading/thread_restrictions.h"
|
#include "base/threading/thread_restrictions.h"
|
||||||
#include "components/network_session_configurator/common/network_switches.h"
|
#include "components/network_session_configurator/common/network_switches.h"
|
||||||
#include "content/app/content_service_manager_main_delegate.h"
|
#include "content/app/content_service_manager_main_delegate.h"
|
||||||
#include "content/browser/startup_helper.h"
|
|
||||||
#include "content/public/browser/notification_service.h"
|
#include "content/public/browser/notification_service.h"
|
||||||
#include "content/public/browser/notification_types.h"
|
#include "content/public/browser/notification_types.h"
|
||||||
#include "content/public/browser/render_process_host.h"
|
#include "content/public/browser/render_process_host.h"
|
||||||
|
@ -428,11 +427,6 @@ bool CefContext::Initialize(const CefMainArgs& args,
|
||||||
base::WaitableEvent::ResetPolicy::AUTOMATIC,
|
base::WaitableEvent::ResetPolicy::AUTOMATIC,
|
||||||
base::WaitableEvent::InitialState::NOT_SIGNALED);
|
base::WaitableEvent::InitialState::NOT_SIGNALED);
|
||||||
|
|
||||||
// This is required because creating a base::Thread as starting it will
|
|
||||||
// check some feature flags this will cause a CHECK failure later when this
|
|
||||||
// gets called by some call down the line of service_manager::MainRun.
|
|
||||||
content::SetUpFieldTrialsAndFeatureList();
|
|
||||||
|
|
||||||
if (!main_delegate_->CreateUIThread(base::BindOnce(
|
if (!main_delegate_->CreateUIThread(base::BindOnce(
|
||||||
[](CefContext* context, base::WaitableEvent* event) {
|
[](CefContext* context, base::WaitableEvent* event) {
|
||||||
service_manager::MainRun(*context->sm_main_params_);
|
service_manager::MainRun(*context->sm_main_params_);
|
||||||
|
|
Loading…
Reference in New Issue