Index: chrome/browser/extensions/api/management/chrome_management_api_delegate.cc |
diff --git a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc |
index 661bf478158998bc14dd8b2ba7db123a17d98944..89151f223a16682632539c962cf266775a893f24 100644 |
--- a/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc |
+++ b/chrome/browser/extensions/api/management/chrome_management_api_delegate.cc |
@@ -77,12 +77,12 @@ class ManagementUninstallFunctionUninstallDialogDelegate |
const extensions::Extension* target_extension, |
bool show_programmatic_uninstall_ui) |
: function_(function) { |
- content::WebContents* web_contents = function->GetSenderWebContents(); |
+ Profile* profile = Profile::FromBrowserContext(function->browser_context()); |
+ Browser* browser = chrome::FindBrowserWithProfile( |
+ profile, chrome::HOST_DESKTOP_TYPE_NATIVE); |
not at google - send to devlin
2015/07/08 20:40:40
Looks like you're not supposed to hard-code this e
wjywbs
2015/07/08 23:01:21
Done.
|
extension_uninstall_dialog_.reset( |
extensions::ExtensionUninstallDialog::Create( |
- Profile::FromBrowserContext(function->browser_context()), |
- web_contents ? web_contents->GetTopLevelNativeWindow() : nullptr, |
- this)); |
+ profile, browser->window()->GetNativeWindow(), this)); |
not at google - send to devlin
2015/07/08 20:40:41
I think it's better to at least try to show it in
wjywbs
2015/07/08 23:01:21
Done.
|
if (show_programmatic_uninstall_ui) { |
extension_uninstall_dialog_->ConfirmUninstallByExtension( |
target_extension, function->extension(), |