mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-01-18 20:51:07 +01:00
76642ccafa
The Chrome runtime requires that cookieable scheme information be available at Profile initialization time because it also triggers NetworkContext creation at the same time. To make this possible, and to avoid various race conditions when setting state, the cookieable scheme configuration has been added as |cookieable_schemes_list| and |cookieable_schemes_exclude_defaults| in CefSettings and CefBrowserContextSettings. The CefCookieManager:: SetSupportedSchemes and CefBrowserProcessHandler::GetCookieableSchemes methods are no longer required and have been removed. This change also modifies chrome to delay OffTheRecordProfileImpl initialization so that |ChromeBrowserContext::profile_| can be set before ChromeContentBrowserClientCef::ConfigureNetworkContextParams calls CefBrowserContext::FromBrowserContext to retrieve the ChromeBrowserContext and associated cookieable scheme information. Otherwise, the ChromeBrowserContext will not be matched and the NetworkContext will not be configured correctly. The CookieTest suite now passes with the Chrome runtime enabled.
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
// Copyright (c) 2013 The Chromium Embedded Framework Authors. All rights
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
// can be found in the LICENSE file.
|
|
|
|
#ifndef CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_
|
|
#define CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_
|
|
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include "include/cef_app.h"
|
|
|
|
namespace client {
|
|
|
|
// Base class for customizing process-type-based behavior.
|
|
class ClientApp : public CefApp {
|
|
public:
|
|
ClientApp();
|
|
|
|
enum ProcessType {
|
|
BrowserProcess,
|
|
RendererProcess,
|
|
ZygoteProcess,
|
|
OtherProcess,
|
|
};
|
|
|
|
// Determine the process type based on command-line arguments.
|
|
static ProcessType GetProcessType(CefRefPtr<CefCommandLine> command_line);
|
|
|
|
private:
|
|
// Registers custom schemes. Implemented by cefclient in
|
|
// client_app_delegates_common.cc
|
|
static void RegisterCustomSchemes(CefRawPtr<CefSchemeRegistrar> registrar);
|
|
|
|
// CefApp methods.
|
|
void OnRegisterCustomSchemes(
|
|
CefRawPtr<CefSchemeRegistrar> registrar) OVERRIDE;
|
|
|
|
DISALLOW_COPY_AND_ASSIGN(ClientApp);
|
|
};
|
|
|
|
} // namespace client
|
|
|
|
#endif // CEF_TESTS_SHARED_COMMON_CLIENT_APP_H_
|