mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Mac: Fix build error and NetworkService startup assertion (see issue #2622).
Fixes FATAL:os_crypt_mac.mm(103)] Check failed: g_key_creation_util
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
#include "libcef/common/extensions/extensions_client.h"
|
||||
#include "libcef/common/extensions/extensions_util.h"
|
||||
#include "libcef/common/net/net_resource_provider.h"
|
||||
#include "libcef/common/net_service/util.h"
|
||||
|
||||
#include "base/bind.h"
|
||||
#include "base/message_loop/message_loop.h"
|
||||
@ -60,6 +61,11 @@
|
||||
#include "libcef/browser/printing/print_dialog_linux.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "components/os_crypt/os_crypt.h"
|
||||
#endif
|
||||
|
||||
CefBrowserMainParts::CefBrowserMainParts(
|
||||
const content::MainFunctionParams& parameters)
|
||||
: BrowserMainParts(), devtools_delegate_(NULL) {}
|
||||
@ -115,6 +121,15 @@ void CefBrowserMainParts::PreMainMessageLoopStart() {
|
||||
ui::TouchFactory::SetTouchDeviceListFromCommandLine();
|
||||
#endif
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
if (net_service::IsEnabled()) {
|
||||
// Initialize the OSCrypt.
|
||||
PrefService* local_state = g_browser_process->local_state();
|
||||
DCHECK(local_state);
|
||||
OSCrypt::Init(local_state);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (size_t i = 0; i < chrome_extra_parts_.size(); ++i)
|
||||
chrome_extra_parts_[i]->PreMainMessageLoopStart();
|
||||
}
|
||||
|
Reference in New Issue
Block a user