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

Issue 7920023: Fix crashes related to the extension uninstall dialog. (Closed)

Created:
9 years, 3 months ago by jstritar
Modified:
9 years, 3 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Fix crashes related to the extension uninstall dialog. The uninstall prompt is owned by the settings page (the dialog's delegate), which gets destroyed when the user navigates to a new page. We need to make sure we invalidate pointers to the settings page when this occurs. This adds an ExtensionUninstallDialog with platform specific implementations. GTK: The settings page owns the ExtensionUninstallDialogGtk, which closes the GTK prompt when being destroyed. VIEWS: The views framework is a bit more convoluted because views owns the prompt's views::View. We have two classes: ExtensionUninstallDialogDelegateView owned by views, and ExtensionUninstallDialogViews owned by the settings page. If the user accepts or denies the prompt, we proxy the events through ExtensionUninstallDialogViews so we can invalidate pointers back to the views widget. If the settings page is destroyed, the ExtensionUninstallDialogViews closes the views widget after invalidating pointers back to the settings page. COCOA: You can't navigate away from the page when the prompt is open, so the dialog can't outlive its delegate. BUG=75011 TEST=see bug. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102351

Patch Set 1 #

Total comments: 4

Patch Set 2 : feedback #

Patch Set 3 : comments #

Total comments: 3

Patch Set 4 : make Show() pure virtual #

Unified diffs Side-by-side diffs Delta from patch set Stats (+361 lines, -229 lines) Patch
M chrome/browser/extensions/extension_context_menu_model.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extension_context_menu_model.cc View 1 3 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/extension_install_ui.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_uninstall_dialog.h View 1 2 3 2 chunks +30 lines, -25 lines 0 comments Download
M chrome/browser/extensions/extension_uninstall_dialog.cc View 1 2 3 2 chunks +9 lines, -11 lines 0 comments Download
M chrome/browser/extensions/extensions_ui.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/extensions/extensions_ui.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_action_context_menu.mm View 1 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_uninstall_dialog_cocoa.mm View 1 2 2 chunks +34 lines, -10 lines 0 comments Download
M chrome/browser/ui/gtk/extensions/extension_uninstall_dialog_gtk.cc View 1 2 chunks +66 lines, -40 lines 0 comments Download
M chrome/browser/ui/panels/panel_settings_menu_model.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/panels/panel_settings_menu_model.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc View 1 2 chunks +177 lines, -99 lines 0 comments Download
M chrome/browser/ui/webui/ntp/app_launcher_handler.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/ntp/app_launcher_handler.cc View 1 5 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/ui/webui/options/extension_settings_handler.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/webui/options/extension_settings_handler.cc View 1 3 chunks +4 lines, -4 lines 0 comments Download
M views/window/dialog_delegate.h View 1 chunk +4 lines, -5 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jstritar
Can you take a look? The views part is a little strange, but it is ...
9 years, 3 months ago (2011-09-16 22:27:52 UTC) #1
jstritar
On 2011/09/16 22:27:52, jstritar wrote: > Can you take a look? The views part is ...
9 years, 3 months ago (2011-09-19 14:50:01 UTC) #2
jstritar
You can go ahead and take a look at this. I'm not sure that ownership ...
9 years, 3 months ago (2011-09-20 14:33:30 UTC) #3
Mihai Parparita -not on Chrome
Can you write in the CL description a brief overview of how this fixes the ...
9 years, 3 months ago (2011-09-20 23:54:47 UTC) #4
jstritar
Thanks for the feedback. This is ready for another review. I didn't end up needing ...
9 years, 3 months ago (2011-09-22 16:47:13 UTC) #5
Mihai Parparita -not on Chrome
http://codereview.chromium.org/7920023/diff/9001/chrome/browser/extensions/extension_uninstall_dialog.h File chrome/browser/extensions/extension_uninstall_dialog.h (right): http://codereview.chromium.org/7920023/diff/9001/chrome/browser/extensions/extension_uninstall_dialog.h#newcode70 chrome/browser/extensions/extension_uninstall_dialog.h:70: virtual void Show(); Shouldn't this be a pure virtual ...
9 years, 3 months ago (2011-09-22 16:56:33 UTC) #6
jstritar
http://codereview.chromium.org/7920023/diff/9001/chrome/browser/extensions/extension_uninstall_dialog.h File chrome/browser/extensions/extension_uninstall_dialog.h (right): http://codereview.chromium.org/7920023/diff/9001/chrome/browser/extensions/extension_uninstall_dialog.h#newcode70 chrome/browser/extensions/extension_uninstall_dialog.h:70: virtual void Show(); On 2011/09/22 16:56:33, Mihai Parparita wrote: ...
9 years, 3 months ago (2011-09-22 17:12:02 UTC) #7
jstritar
http://codereview.chromium.org/7920023/diff/9001/chrome/browser/extensions/extension_uninstall_dialog.h File chrome/browser/extensions/extension_uninstall_dialog.h (right): http://codereview.chromium.org/7920023/diff/9001/chrome/browser/extensions/extension_uninstall_dialog.h#newcode70 chrome/browser/extensions/extension_uninstall_dialog.h:70: virtual void Show(); On 2011/09/22 16:56:33, Mihai Parparita wrote: ...
9 years, 3 months ago (2011-09-22 17:56:52 UTC) #8
Mihai Parparita -not on Chrome
lgtm
9 years, 3 months ago (2011-09-22 18:08:27 UTC) #9
commit-bot: I haz the power
CQ is trying tha patch. Follow status at https://chromium-status.appspot.com/cq/jstritar@chromium.org/7920023/10002
9 years, 3 months ago (2011-09-22 20:24:26 UTC) #10
commit-bot: I haz the power
9 years, 3 months ago (2011-09-22 20:27:18 UTC) #11
Presubmit check for 7920023-10002 failed and returned exit status 1.

Running presubmit commit checks ...

** Presubmit ERRORS **
chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc, line 82:
new code should not use wstrings.  If you are calling an API that accepts a
wstring, fix the API.

chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc, line 162:
new code should not use wstrings.  If you are calling an API that accepts a
wstring, fix the API.

chrome/browser/ui/views/extensions/extension_uninstall_dialog_view.cc, line 188:
new code should not use wstrings.  If you are calling an API that accepts a
wstring, fix the API.

Presubmit checks took 2.4s to calculate.

Powered by Google App Engine
This is Rietveld 408576698