Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2607)

Unified Diff: chrome/browser/chromeos/attestation/platform_verification_flow.cc

Issue 881983003: media: Invoke PlatformVerificationDialog from ProtectedMediaIdentifierPermissionContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/attestation/platform_verification_flow.cc
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow.cc b/chrome/browser/chromeos/attestation/platform_verification_flow.cc
index 69765aec7d32b7a3bdc60bc6b27ea3b6bb45de12..241cb0f13e268a4c898e13dd6039da58c82060b3 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_flow.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow.cc
@@ -79,9 +79,11 @@ class DefaultDelegate : public PlatformVerificationFlow::Delegate {
void ShowConsentPrompt(
content::WebContents* web_contents,
+ const GURL& requesting_origin,
const PlatformVerificationFlow::Delegate::ConsentCallback& callback)
override {
- PlatformVerificationDialog::ShowDialog(web_contents, callback);
+ PlatformVerificationDialog::ShowDialog(web_contents, requesting_origin,
+ callback);
}
PrefService* GetPrefs(content::WebContents* web_contents) override {
@@ -235,10 +237,14 @@ void PlatformVerificationFlow::CheckConsent(const ChallengeContext& context,
this,
context,
consent_required);
- if (consent_required)
- delegate_->ShowConsentPrompt(context.web_contents, consent_callback);
- else
+ if (consent_required) {
+ delegate_->ShowConsentPrompt(
+ context.web_contents,
+ context.web_contents->GetLastCommittedURL().GetOrigin(),
ddorwin 2015/02/05 02:23:24 This is the old path and will be removed when pref
xhwang 2015/02/05 02:49:34 Yes, this is not secure. But it'll be removed soon
+ consent_callback);
+ } else {
consent_callback.Run(CONSENT_RESPONSE_NONE);
+ }
}
void PlatformVerificationFlow::RegisterProfilePrefs(

Powered by Google App Engine
This is Rietveld 408576698