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

Issue 1534123002: [Extensions] Migrate ExtensionInstallPrompt::Delegate to be a callback (Closed)

Created:
5 years ago by Devlin
Modified:
4 years, 11 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Extensions] Migrate ExtensionInstallPrompt::Delegate to be a callback The ExtensionInstallPrompt + Delegate setup is prone to lifetime issues because the caller of the delegate is a UI element, whereas the delegate is usually somehow part of the extension system. At best, this makes lifetime management a little confusing, but at worst, it's fundamentally flawed because UI ownership and extension system ownership are very complicated at times like shutdown. Instead, migrate the delegate to be a callback, where lifetime management is more explicit (and safe if the fka delegate is deleted). Also update a few confusing parts of the Cocoa install prompt API. BUG=567844 TBR=benwells@chromium.org (small c/b/ui/extensions changes) Committed: https://crrev.com/415930557c280022fed6a6ddd01f80f443704683 Cr-Commit-Position: refs/heads/master@{#368238}

Patch Set 1 : #

Total comments: 34

Patch Set 2 : Comments #

Patch Set 3 : Rebase #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+786 lines, -650 lines) Patch
M chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h View 1 4 chunks +5 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/dashboard_private/dashboard_private_api.cc View 2 chunks +15 lines, -15 lines 0 comments Download
M chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.h View 2 chunks +3 lines, -5 lines 0 comments Download
M chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc View 1 chunk +20 lines, -19 lines 0 comments Download
M chrome/browser/extensions/api/management/chrome_management_api_delegate.h View 1 chunk +4 lines, -2 lines 0 comments Download
M chrome/browser/extensions/api/management/chrome_management_api_delegate.cc View 1 2 3 3 chunks +29 lines, -21 lines 0 comments Download
M chrome/browser/extensions/api/permissions/permissions_api.h View 1 4 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/extensions/api/permissions/permissions_api.cc View 4 chunks +18 lines, -20 lines 0 comments Download
M chrome/browser/extensions/api/webstore_private/webstore_private_api.h View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/extensions/api/webstore_private/webstore_private_api.cc View 1 4 chunks +19 lines, -10 lines 0 comments Download
M chrome/browser/extensions/bundle_installer.h View 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/bundle_installer.cc View 4 chunks +21 lines, -13 lines 0 comments Download
M chrome/browser/extensions/crx_installer.h View 2 chunks +2 lines, -6 lines 0 comments Download
M chrome/browser/extensions/crx_installer.cc View 4 chunks +23 lines, -32 lines 0 comments Download
M chrome/browser/extensions/extension_disabled_ui.cc View 1 2 4 chunks +25 lines, -23 lines 0 comments Download
M chrome/browser/extensions/extension_install_prompt.h View 1 4 chunks +13 lines, -18 lines 0 comments Download
M chrome/browser/extensions/extension_install_prompt.cc View 1 8 chunks +20 lines, -25 lines 0 comments Download
M chrome/browser/extensions/extension_install_prompt_browsertest.cc View 5 chunks +28 lines, -57 lines 0 comments Download
A chrome/browser/extensions/extension_install_prompt_test_helper.h View 1 chunk +39 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_install_prompt_test_helper.cc View 1 chunk +38 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_install_prompt_unittest.cc View 7 chunks +8 lines, -9 lines 0 comments Download
M chrome/browser/extensions/extension_reenabler.h View 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/extension_reenabler.cc View 3 chunks +38 lines, -21 lines 0 comments Download
M chrome/browser/extensions/extension_reenabler_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/extension_service_unittest.cc View 1 2 3 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/extensions/external_install_error.h View 3 chunks +3 lines, -6 lines 0 comments Download
M chrome/browser/extensions/external_install_error.cc View 1 2 5 chunks +38 lines, -31 lines 0 comments Download
M chrome/browser/extensions/navigation_observer.h View 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/extensions/navigation_observer.cc View 3 chunks +27 lines, -29 lines 0 comments Download
M chrome/browser/extensions/unpacked_installer.cc View 2 chunks +19 lines, -15 lines 0 comments Download
M chrome/browser/extensions/webstore_inline_installer_browsertest.cc View 1 2 chunks +16 lines, -11 lines 0 comments Download
M chrome/browser/extensions/webstore_reinstaller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/extensions/webstore_reinstaller.cc View 2 chunks +9 lines, -2 lines 0 comments Download
M chrome/browser/extensions/webstore_standalone_installer.h View 2 chunks +2 lines, -4 lines 0 comments Download
M chrome/browser/extensions/webstore_standalone_installer.cc View 4 chunks +15 lines, -9 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.h View 3 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller.mm View 4 chunks +35 lines, -21 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_dialog_controller_browsertest.mm View 3 chunks +15 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.h View 1 chunk +0 lines, -21 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_prompt_test_utils.mm View 1 chunk +0 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_view_controller.h View 3 chunks +13 lines, -3 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_view_controller.mm View 2 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/extension_install_view_controller_unittest.mm View 8 chunks +49 lines, -14 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.h View 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller.mm View 4 chunks +19 lines, -12 lines 0 comments Download
M chrome/browser/ui/cocoa/extensions/windowed_install_dialog_controller_browsertest.mm View 4 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/ui/extensions/extension_enable_flow.h View 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/extensions/extension_enable_flow.cc View 3 chunks +24 lines, -20 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_install_dialog_view.h View 1 3 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_install_dialog_view.cc View 6 chunks +14 lines, -9 lines 0 comments Download
M chrome/browser/ui/views/extensions/extension_install_dialog_view_browsertest.cc View 7 chunks +16 lines, -45 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M extensions/browser/api/management/management_api.h View 2 chunks +2 lines, -3 lines 0 comments Download
M extensions/browser/api/management/management_api.cc View 2 chunks +15 lines, -13 lines 0 comments Download
M extensions/browser/api/management/management_api_delegate.h View 2 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 30 (18 generated)
Devlin
Antony (everything), Avi (cocoa), please take a look when you can. I know it's the ...
4 years, 11 months ago (2015-12-29 00:12:52 UTC) #13
Avi (use Gerrit)
lgtm Lookin' good, though you really need to iwyu. https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h File chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h (right): https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h#newcode75 chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h:75: ...
4 years, 11 months ago (2015-12-29 03:10:45 UTC) #14
asargent_no_longer_on_chrome
I found a couple of minor issues https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc File chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc (right): https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc#newcode87 chrome/browser/extensions/api/developer_private/show_permissions_dialog_helper.cc:87: // deletes ...
4 years, 11 months ago (2015-12-31 00:45:56 UTC) #15
Devlin
https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h File chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h (right): https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h#newcode75 chrome/browser/extensions/api/dashboard_private/dashboard_private_api.h:75: DISALLOW_COPY_AND_ASSIGN( On 2015/12/29 03:10:45, Avi wrote: > #include "base/macros.h" ...
4 years, 11 months ago (2016-01-04 22:59:23 UTC) #16
asargent_no_longer_on_chrome
lgtm https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/extension_install_prompt.cc File chrome/browser/extensions/extension_install_prompt.cc (right): https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/extension_install_prompt.cc#newcode846 chrome/browser/extensions/extension_install_prompt.cc:846: std::move(prompt_)); On 2016/01/04 22:59:23, Devlin wrote: > On ...
4 years, 11 months ago (2016-01-05 18:58:54 UTC) #17
Devlin
https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/extension_install_prompt.cc File chrome/browser/extensions/extension_install_prompt.cc (right): https://codereview.chromium.org/1534123002/diff/180001/chrome/browser/extensions/extension_install_prompt.cc#newcode846 chrome/browser/extensions/extension_install_prompt.cc:846: std::move(prompt_)); On 2016/01/05 18:58:54, Antony Sargent wrote: > On ...
4 years, 11 months ago (2016-01-05 21:30:16 UTC) #18
Devlin
+Finnur for c/b/ui/views/extensions
4 years, 11 months ago (2016-01-05 21:30:34 UTC) #20
Devlin
+Finnur for c/b/ui/views/extensions
4 years, 11 months ago (2016-01-05 21:30:37 UTC) #21
Finnur
c/b/ui/views/extensions LGTM
4 years, 11 months ago (2016-01-06 10:36:19 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1534123002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1534123002/240001
4 years, 11 months ago (2016-01-08 01:33:02 UTC) #26
commit-bot: I haz the power
Committed patchset #4 (id:240001)
4 years, 11 months ago (2016-01-08 01:40:20 UTC) #28
commit-bot: I haz the power
4 years, 11 months ago (2016-01-08 01:41:27 UTC) #30
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/415930557c280022fed6a6ddd01f80f443704683
Cr-Commit-Position: refs/heads/master@{#368238}

Powered by Google App Engine
This is Rietveld 408576698