Commit 021d300d authored by arthursonzogni's avatar arthursonzogni Committed by Commit Bot

Cleanup. Move 'reset media device salt" into DidCommitNewDocument.

There is a dedicated function for everything that should be set/reset
when committing a new document. It's better adding new stuff inside,
instead of immediately outside.

Bug: 1113294.
Change-Id: I3e076455d46c0658c06eb9452627ff7b38c06da6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2537684Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827729}
parent 3015e72a
......@@ -2620,14 +2620,8 @@ void RenderFrameHostImpl::DidNavigate(
if (!params.url_is_unreachable)
last_successful_url_ = params.url;
if (did_create_new_document) {
if (did_create_new_document)
DidCommitNewDocument(params, navigation_request);
// Reset the salt so that media device IDs are reset for the new document
// if necessary.
media_device_id_salt_base_ =
BrowserContext::CreateRandomMediaDeviceIDSalt();
}
}
void RenderFrameHostImpl::SetLastCommittedOrigin(const url::Origin& origin) {
......@@ -8826,6 +8820,10 @@ void RenderFrameHostImpl::DidCommitNewDocument(
CrossOriginOpenerPolicyReporter::InstallAccessMonitorsIfNeeded(
frame_tree_node_);
// Reset the salt so that media device IDs are reset for the new document
// if necessary.
media_device_id_salt_base_ = BrowserContext::CreateRandomMediaDeviceIDSalt();
}
void RenderFrameHostImpl::OnSameDocumentCommitProcessed(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment