mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- Support runtime configuration of renderer-related preferences (issue #1501).
- Persist modified user preferences including per-host zoom settings when a cache_path value is specified and persist_user_preferences is set to true via CefSettings or CefRequestContextSettings. - Avoid the need to duplicate files from chrome/ by having CefBrowserContext extend Chrome's Profile class.
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "libcef/browser/url_request_context_getter_proxy.h"
|
||||
|
||||
#include "base/logging.h"
|
||||
#include "chrome/browser/font_family_cache.h"
|
||||
#include "components/guest_view/common/guest_view_constants.h"
|
||||
#include "content/browser/streams/stream_context.h"
|
||||
#include "content/public/browser/storage_partition.h"
|
||||
@@ -27,6 +28,12 @@ bool ShouldProxyUserData(const void* key) {
|
||||
if (key == guest_view::kGuestViewManagerKeyName)
|
||||
return true;
|
||||
|
||||
// If this value is not proxied then there will be a use-after-free while
|
||||
// destroying the FontFamilyCache because it will try to access the
|
||||
// ProxyService owned by CefBrowserContextImpl (which has already been freed).
|
||||
if (key == kFontFamilyCacheKey)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -43,6 +50,8 @@ CefBrowserContextProxy::CefBrowserContextProxy(
|
||||
}
|
||||
|
||||
CefBrowserContextProxy::~CefBrowserContextProxy() {
|
||||
Shutdown();
|
||||
|
||||
parent_->RemoveProxy(this);
|
||||
}
|
||||
|
||||
@@ -142,6 +151,14 @@ content::PermissionManager* CefBrowserContextProxy::GetPermissionManager() {
|
||||
return parent_->GetPermissionManager();
|
||||
}
|
||||
|
||||
PrefService* CefBrowserContextProxy::GetPrefs() {
|
||||
return parent_->GetPrefs();
|
||||
}
|
||||
|
||||
const PrefService* CefBrowserContextProxy::GetPrefs() const {
|
||||
return parent_->GetPrefs();
|
||||
}
|
||||
|
||||
const CefRequestContextSettings& CefBrowserContextProxy::GetSettings() const {
|
||||
return parent_->GetSettings();
|
||||
}
|
||||
@@ -173,7 +190,3 @@ net::URLRequestContextGetter*
|
||||
HostContentSettingsMap* CefBrowserContextProxy::GetHostContentSettingsMap() {
|
||||
return parent_->GetHostContentSettingsMap();
|
||||
}
|
||||
|
||||
PrefService* CefBrowserContextProxy::GetPrefs() {
|
||||
return parent_->GetPrefs();
|
||||
}
|
||||
|
Reference in New Issue
Block a user