mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CookieManagerImpl for NetworkService (see issue #2622).
To test: Run `ceftests --gtest_filter=CookieTest.*:-CookieTest.GetCookieManager* --enable-network-service` There should be no functional change when running without the NetworkService enabled. Known issues: - CefCookieManager::SetSupportedSchemes is not yet implemented.
This commit is contained in:
@@ -6,8 +6,9 @@
|
||||
#include "libcef/browser/browser_context.h"
|
||||
#include "libcef/browser/content_browser_client.h"
|
||||
#include "libcef/browser/context.h"
|
||||
#include "libcef/browser/cookie_manager_impl.h"
|
||||
#include "libcef/browser/extensions/extension_system.h"
|
||||
#include "libcef/browser/net/cookie_manager_old_impl.h"
|
||||
#include "libcef/browser/net_service/cookie_manager_impl.h"
|
||||
#include "libcef/browser/thread_util.h"
|
||||
#include "libcef/common/extensions/extensions_util.h"
|
||||
#include "libcef/common/net_service/util.h"
|
||||
@@ -281,9 +282,16 @@ CefString CefRequestContextImpl::GetCachePath() {
|
||||
|
||||
CefRefPtr<CefCookieManager> CefRequestContextImpl::GetCookieManager(
|
||||
CefRefPtr<CefCompletionCallback> callback) {
|
||||
CefRefPtr<CefCookieManagerImpl> cookie_manager = new CefCookieManagerImpl();
|
||||
cookie_manager->Initialize(this, CefString(), false, callback);
|
||||
return cookie_manager.get();
|
||||
if (!net_service::IsEnabled()) {
|
||||
CefRefPtr<CefCookieManagerOldImpl> cookie_manager =
|
||||
new CefCookieManagerOldImpl();
|
||||
cookie_manager->Initialize(this, CefString(), false, callback);
|
||||
return cookie_manager.get();
|
||||
} else {
|
||||
CefRefPtr<CefCookieManagerImpl> cookie_manager = new CefCookieManagerImpl();
|
||||
cookie_manager->Initialize(this, callback);
|
||||
return cookie_manager.get();
|
||||
}
|
||||
}
|
||||
|
||||
bool CefRequestContextImpl::RegisterSchemeHandlerFactory(
|
||||
|
Reference in New Issue
Block a user