fix: allow persistent media salts (#22386) (#22567)

* fix: allow persistent media salts

* chore: add regression test for persistent media device ids across reloads

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
Samuel Attard
2020-03-05 16:58:39 -08:00
committed by GitHub
parent 926bea232d
commit 1fc197bedb
3 changed files with 29 additions and 2 deletions

View File

@@ -872,6 +872,14 @@ bool ElectronBrowserClient::ShouldUseProcessPerSite(
#endif
}
bool ElectronBrowserClient::ArePersistentMediaDeviceIDsAllowed(
content::BrowserContext* browser_context,
const GURL& scope,
const GURL& site_for_cookies,
const base::Optional<url::Origin>& top_frame_origin) {
return true;
}
void ElectronBrowserClient::SiteInstanceDeleting(
content::SiteInstance* site_instance) {
// We are storing weak_ptr, is it fundamental to maintain the map up-to-date

View File

@@ -246,6 +246,11 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
int frame_tree_node_id) override;
base::flat_set<std::string> GetPluginMimeTypesWithExternalHandlers(
content::BrowserContext* browser_context) override;
bool ArePersistentMediaDeviceIDsAllowed(
content::BrowserContext* browser_context,
const GURL& scope,
const GURL& site_for_cookies,
const base::Optional<url::Origin>& top_frame_origin) override;
// content::RenderProcessHostObserver:
void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;