mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update to Chromium version 117.0.5895.0 (#1171312)
This commit is contained in:
@@ -21,7 +21,6 @@
|
||||
#include "base/logging.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "chrome/browser/font_family_cache.h"
|
||||
#include "chrome/browser/media/media_device_id_salt.h"
|
||||
#include "chrome/browser/permissions/permission_manager_factory.h"
|
||||
#include "chrome/browser/plugins/chrome_plugin_service_filter.h"
|
||||
#include "chrome/browser/profiles/profile_key.h"
|
||||
@@ -190,8 +189,6 @@ void AlloyBrowserContext::Initialize() {
|
||||
}
|
||||
|
||||
ChromePluginServiceFilter::GetInstance()->RegisterProfile(this);
|
||||
|
||||
media_device_id_salt_ = new MediaDeviceIDSalt(pref_service);
|
||||
}
|
||||
|
||||
void AlloyBrowserContext::Shutdown() {
|
||||
@@ -421,10 +418,6 @@ AlloyBrowserContext::GetReduceAcceptLanguageControllerDelegate() {
|
||||
return ReduceAcceptLanguageFactory::GetForProfile(this);
|
||||
}
|
||||
|
||||
std::string AlloyBrowserContext::GetMediaDeviceIDSalt() {
|
||||
return media_device_id_salt_->GetSalt();
|
||||
}
|
||||
|
||||
PrefService* AlloyBrowserContext::GetPrefs() {
|
||||
return pref_service_.get();
|
||||
}
|
||||
|
@@ -18,7 +18,6 @@
|
||||
class CefDownloadManagerDelegate;
|
||||
class CefSSLHostStateDelegate;
|
||||
class CefVisitedLinkListener;
|
||||
class MediaDeviceIDSalt;
|
||||
class PrefService;
|
||||
|
||||
namespace extensions {
|
||||
@@ -83,7 +82,6 @@ class AlloyBrowserContext : public ChromeProfileAlloy,
|
||||
override;
|
||||
content::ReduceAcceptLanguageControllerDelegate*
|
||||
GetReduceAcceptLanguageControllerDelegate() override;
|
||||
std::string GetMediaDeviceIDSalt() override;
|
||||
|
||||
// Profile overrides.
|
||||
ChromeZoomLevelPrefs* GetZoomLevelPrefs() override;
|
||||
@@ -146,8 +144,6 @@ class AlloyBrowserContext : public ChromeProfileAlloy,
|
||||
std::unique_ptr<DownloadPrefs> download_prefs_;
|
||||
|
||||
std::unique_ptr<content::ResourceContext> resource_context_;
|
||||
|
||||
scoped_refptr<MediaDeviceIDSalt> media_device_id_salt_;
|
||||
};
|
||||
|
||||
#endif // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_CONTEXT_H_
|
||||
|
@@ -43,6 +43,7 @@
|
||||
#include "net/base/net_module.h"
|
||||
#include "third_party/widevine/cdm/buildflags.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "ui/color/color_provider_manager.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
|
@@ -55,6 +55,7 @@
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/content_settings/cookie_settings_factory.h"
|
||||
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
|
||||
#include "chrome/browser/media/webrtc/media_device_salt_service_factory.h"
|
||||
#include "chrome/browser/net/profile_network_context_service.h"
|
||||
#include "chrome/browser/net/profile_network_context_service_factory.h"
|
||||
#include "chrome/browser/net/system_network_context_manager.h"
|
||||
@@ -85,6 +86,7 @@
|
||||
#include "components/content_settings/core/browser/cookie_settings.h"
|
||||
#include "components/embedder_support/switches.h"
|
||||
#include "components/embedder_support/user_agent_utils.h"
|
||||
#include "components/media_device_salt/media_device_salt_service.h"
|
||||
#include "components/pdf/browser/pdf_navigation_throttle.h"
|
||||
#include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
|
||||
#include "components/pdf/browser/pdf_web_contents_helper.h"
|
||||
@@ -567,8 +569,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
embedder_support::kUserAgent,
|
||||
switches::kUserAgentProductAndVersion,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames);
|
||||
}
|
||||
|
||||
const std::string& process_type =
|
||||
@@ -586,8 +587,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
switches::kUncaughtExceptionStackSize,
|
||||
network::switches::kUnsafelyTreatInsecureOriginAsSecure,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames);
|
||||
|
||||
if (extensions::ExtensionsEnabled()) {
|
||||
content::RenderProcessHost* process =
|
||||
@@ -615,8 +615,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
static const char* const kSwitchNames[] = {
|
||||
switches::kLang,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames);
|
||||
}
|
||||
|
||||
// Necessary to populate DIR_USER_DATA in sub-processes.
|
||||
@@ -642,8 +641,7 @@ void AlloyContentBrowserClient::AppendExtraCommandLineSwitches(
|
||||
static const char* const kSwitchNames[] = {
|
||||
switches::kLogFile,
|
||||
};
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
|
||||
std::size(kSwitchNames));
|
||||
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames);
|
||||
}
|
||||
|
||||
if (crash_reporting::Enabled()) {
|
||||
@@ -1337,16 +1335,31 @@ AlloyContentBrowserClient::GetPluginMimeTypesWithExternalHandlers(
|
||||
return mime_types;
|
||||
}
|
||||
|
||||
bool AlloyContentBrowserClient::ArePersistentMediaDeviceIDsAllowed(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& url,
|
||||
void AlloyContentBrowserClient::GetMediaDeviceIDSalt(
|
||||
content::RenderFrameHost* rfh,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<url::Origin>& top_frame_origin) {
|
||||
const blink::StorageKey& storage_key,
|
||||
base::OnceCallback<void(bool, const std::string&)> callback) {
|
||||
GURL url = rfh->GetLastCommittedURL();
|
||||
url::Origin top_frame_origin = rfh->GetMainFrame()->GetLastCommittedOrigin();
|
||||
content::BrowserContext* browser_context = rfh->GetBrowserContext();
|
||||
|
||||
// Persistent MediaDevice IDs are allowed if cookies are allowed.
|
||||
return CookieSettingsFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(browser_context))
|
||||
->IsFullCookieAccessAllowed(url, site_for_cookies, top_frame_origin,
|
||||
net::CookieSettingOverrides());
|
||||
scoped_refptr<content_settings::CookieSettings> cookie_settings =
|
||||
CookieSettingsFactory::GetForProfile(
|
||||
Profile::FromBrowserContext(browser_context));
|
||||
bool allowed = cookie_settings->IsFullCookieAccessAllowed(
|
||||
url, site_for_cookies, top_frame_origin,
|
||||
cookie_settings->SettingOverridesForStorage());
|
||||
auto* salt_service =
|
||||
MediaDeviceSaltServiceFactory::GetInstance()->GetForBrowserContext(
|
||||
browser_context);
|
||||
if (!salt_service) {
|
||||
std::move(callback).Run(allowed, browser_context->UniqueId());
|
||||
return;
|
||||
}
|
||||
|
||||
salt_service->GetSalt(base::BindOnce(std::move(callback), allowed));
|
||||
}
|
||||
|
||||
void AlloyContentBrowserClient::OnWebContentsCreated(
|
||||
|
@@ -246,11 +246,11 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient {
|
||||
blink::UserAgentMetadata GetUserAgentMetadata() override;
|
||||
base::flat_set<std::string> GetPluginMimeTypesWithExternalHandlers(
|
||||
content::BrowserContext* browser_context) override;
|
||||
bool ArePersistentMediaDeviceIDsAllowed(
|
||||
content::BrowserContext* browser_context,
|
||||
const GURL& scope,
|
||||
void GetMediaDeviceIDSalt(
|
||||
content::RenderFrameHost* rfh,
|
||||
const net::SiteForCookies& site_for_cookies,
|
||||
const absl::optional<url::Origin>& top_frame_origin) override;
|
||||
const blink::StorageKey& storage_key,
|
||||
base::OnceCallback<void(bool, const std::string&)> callback) override;
|
||||
void OnWebContentsCreated(content::WebContents* web_contents) override;
|
||||
bool IsFindInPageDisabledForOrigin(const url::Origin& origin) override;
|
||||
|
||||
|
@@ -421,3 +421,8 @@ HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() {
|
||||
DCHECK(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
UsbSystemTrayIcon* ChromeBrowserProcessAlloy::usb_system_tray_icon() {
|
||||
DCHECK(false);
|
||||
return nullptr;
|
||||
}
|
||||
|
@@ -109,6 +109,7 @@ class ChromeBrowserProcessAlloy : public BrowserProcess {
|
||||
BuildState* GetBuildState() override;
|
||||
SerialPolicyAllowedPorts* serial_policy_allowed_ports() override;
|
||||
HidSystemTrayIcon* hid_system_tray_icon() override;
|
||||
UsbSystemTrayIcon* usb_system_tray_icon() override;
|
||||
|
||||
private:
|
||||
bool initialized_;
|
||||
|
Reference in New Issue
Block a user