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..5dd40708970fcda072bf381d5e3f7f0b081081c3 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,15 @@ void PlatformVerificationFlow::CheckConsent(const ChallengeContext& context, |
this, |
context, |
consent_required); |
- if (consent_required) |
- delegate_->ShowConsentPrompt(context.web_contents, consent_callback); |
- else |
+ if (consent_required) { |
+ // TODO(xhwang): Using delegate_->GetURL() here is not right. The consent |
+ // may be requested by a frame from a different origin. |
ddorwin
2015/02/05 03:25:26
Add bug#?
xhwang
2015/02/05 05:46:51
Done.
|
+ delegate_->ShowConsentPrompt( |
+ context.web_contents, |
+ delegate_->GetURL(context.web_contents).GetOrigin(), consent_callback); |
+ } else { |
consent_callback.Run(CONSENT_RESPONSE_NONE); |
+ } |
} |
void PlatformVerificationFlow::RegisterProfilePrefs( |