Index: chrome/browser/chromeos/attestation/platform_verification_dialog.cc |
diff --git a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc |
index d3cb6b907abbf476cf7a91962df6dbae9acf0b14..007178c015be43072d0631154e1e9319a133fb77 100644 |
--- a/chrome/browser/chromeos/attestation/platform_verification_dialog.cc |
+++ b/chrome/browser/chromeos/attestation/platform_verification_dialog.cc |
@@ -37,16 +37,18 @@ const int kDialogMaxWidthInPixel = 400; |
} // namespace |
// static |
-void PlatformVerificationDialog::ShowDialog( |
+views::Widget* PlatformVerificationDialog::ShowDialog( |
content::WebContents* web_contents, |
+ const GURL& requesting_origin, |
const PlatformVerificationFlow::Delegate::ConsentCallback& callback) { |
- GURL url = web_contents->GetLastCommittedURL(); |
// In the case of an extension or hosted app, the origin of the request is |
// best described by the extension / app name. |
+ GURL url = web_contents->GetLastCommittedURL(); |
ddorwin
2015/02/05 02:23:23
navigation_url, top_level_url, or something like t
xhwang
2015/02/05 02:49:34
Done.
|
const extensions::Extension* extension = |
extensions::ExtensionRegistry::Get(web_contents->GetBrowserContext())-> |
enabled_extensions().GetExtensionOrAppByURL(url); |
- std::string origin = extension ? extension->name() : url.GetOrigin().spec(); |
+ |
+ std::string origin = extension ? extension->name() : requesting_origin.spec(); |
ddorwin
2015/02/05 02:23:23
should we confirm that the requesting_origin is th
xhwang
2015/02/05 02:49:34
|requesting_origin| is the root of trust here, it'
ddorwin
2015/02/05 03:25:26
But in the app case, we display the app name inste
xhwang
2015/02/05 05:46:51
Do you mean to check that the frame's url is the s
ddorwin
2015/02/05 05:51:06
Yes. And otherwise display the frame. Perhaps, if
|
PlatformVerificationDialog* dialog = new PlatformVerificationDialog( |
web_contents, |
@@ -60,6 +62,8 @@ void PlatformVerificationDialog::ShowDialog( |
views::Widget* widget = views::DialogDelegate::CreateDialogWidget( |
dialog, NULL, popup_manager->GetHostView()); |
popup_manager->ShowModalDialog(widget->GetNativeView(), web_contents); |
+ |
+ return widget; |
} |
PlatformVerificationDialog::~PlatformVerificationDialog() { |