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

Issue 95133002: Add an extension bubble explaining which extensions are in dev mode. (Closed)

Created:
7 years ago by Finnur
Modified:
7 years ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, oshima+watch_chromium.org, extensions-reviews_chromium.org
Visibility:
Public.

Description

Add an extension bubble explaining which extensions are in dev mode. In order to accomplish this without too much code duplication I refactored the common code of the newly added SuspiciousExtension bubble into a base class ExtensionMessageBubbleController and a derived class (SuspiciousExtensionBubbleController) to accomodate a new type of bubble (DevModeBubbleController). I also generalized the BubbleView code to just display whatever the controller tells it (and removed mentions of SuspiciousExtensions from it). The new controller has an action button (Disable) so new functionality was added to accomodate. BUG=TBD

Patch Set 1 #

Patch Set 2 : Polish #

Patch Set 3 : Unused var #

Patch Set 4 : Polish #

Patch Set 5 : Sync'ed #

Total comments: 7

Patch Set 6 : Sync and small fix #

Patch Set 7 : Mergefix #

Patch Set 8 : git cl try #

Patch Set 9 : Delegate #

Patch Set 10 : Polish #

Patch Set 11 : Sync and upload #

Patch Set 12 : Fix compile error #

Total comments: 16

Patch Set 13 : Sync and fix unit test #

Patch Set 14 : Address review comments #

Patch Set 15 : Always highlight extensions #

Patch Set 16 : Sync to latest #

Patch Set 17 : POlish #

Patch Set 18 : Fix unit test #

Total comments: 28

Patch Set 19 : l upload #

Total comments: 2

Patch Set 20 : Address comments #

Patch Set 21 : FeatureSwitch FTW #

Patch Set 22 : Sync to head #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1507 lines, -253 lines) Patch
M chrome/app/theme/theme_resources.grd View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
A chrome/browser/extensions/dev_mode_bubble_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +86 lines, -0 lines 0 comments Download
A chrome/browser/extensions/dev_mode_bubble_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +149 lines, -0 lines 0 comments Download
A chrome/browser/extensions/dev_mode_bubble_controller_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +144 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_message_bubble.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +34 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_message_bubble_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +111 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_message_bubble_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +151 lines, -0 lines 0 comments Download
A chrome/browser/extensions/extension_message_bubble_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +389 lines, -0 lines 0 comments Download
M chrome/browser/extensions/extension_prefs.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
D chrome/browser/extensions/suspicious_extension_bubble.h View 1 chunk +0 lines, -28 lines 0 comments Download
M chrome/browser/extensions/suspicious_extension_bubble_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 5 chunks +9 lines, -16 lines 0 comments Download
M chrome/browser/extensions/suspicious_extension_bubble_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +40 lines, -86 lines 0 comments Download
M chrome/browser/extensions/suspicious_extension_bubble_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 2 chunks +2 lines, -2 lines 0 comments Download
A + chrome/browser/ui/views/extensions/extension_message_bubble_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +25 lines, -20 lines 0 comments Download
A chrome/browser/ui/views/extensions/extension_message_bubble_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +325 lines, -0 lines 0 comments Download
D chrome/browser/ui/views/extensions/suspicious_extension_bubble_view.h View 1 chunk +0 lines, -91 lines 0 comments Download
M chrome/browser/ui/views/toolbar/browser_action_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/browser_actions_container.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/views/toolbar/toolbar_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/chrome_browser_extensions.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +8 lines, -0 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +3 lines, -3 lines 0 comments Download
M extensions/common/feature_switch.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/feature_switch.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +7 lines, -0 lines 0 comments Download
M extensions/common/switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M extensions/common/switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
Finnur
Scott, can you take care of: The rename (and generalization) of: chrome/browser/ui/views/extensions/suspicious_extension_bubble_view.h chrome/browser/ui/views/extensions/suspicious_extension_bubble_view.cc ... to: ...
7 years ago (2013-11-28 15:12:46 UTC) #1
sky
Side by side diffs didn't make it. Could you reupload?
7 years ago (2013-12-02 16:26:44 UTC) #2
Finnur
How about now?
7 years ago (2013-12-02 18:10:51 UTC) #3
sky
Sorry, one more. Can you play with --similarity in hopes of extension_message_bubble_view.cc being seen as ...
7 years ago (2013-12-02 21:56:06 UTC) #4
sky
LGTM
7 years ago (2013-12-02 22:28:03 UTC) #5
not at google - send to devlin
It would be easier to review this if you did the file move + slight ...
7 years ago (2013-12-04 17:25:12 UTC) #6
Finnur
Patch synced to trunk and uploaded with 40% similarity. Should work against trunk now. The ...
7 years ago (2013-12-05 23:55:42 UTC) #7
Finnur
https://codereview.chromium.org/95133002/diff/70001/chrome/browser/extensions/extension_prefs.h File chrome/browser/extensions/extension_prefs.h (right): https://codereview.chromium.org/95133002/diff/70001/chrome/browser/extensions/extension_prefs.h#newcode308 chrome/browser/extensions/extension_prefs.h:308: void SetDevModeAcknowledged(const std::string& extension_id, bool value); Indeed. Done. https://codereview.chromium.org/95133002/diff/70001/extensions/common/extension.h ...
7 years ago (2013-12-05 23:55:54 UTC) #8
not at google - send to devlin
Sorry for the vague comments again, I don't seem able to page this whole change ...
7 years ago (2013-12-10 01:21:39 UTC) #9
Finnur
OK, Ben, here's the latest version. I tried to create a clean patch (using the ...
7 years ago (2013-12-11 23:12:17 UTC) #10
not at google - send to devlin
Ok, I understand this change now, thanks for bearing with me. A bunch of comments ...
7 years ago (2013-12-12 18:21:37 UTC) #11
Finnur
I've made some of the changes requested (see comments below). For the ones I've |not| ...
7 years ago (2013-12-12 20:25:12 UTC) #12
not at google - send to devlin
lgtm, thanks for offering to do a follow-up. https://codereview.chromium.org/95133002/diff/480001/chrome/browser/extensions/dev_mode_bubble_controller.cc File chrome/browser/extensions/dev_mode_bubble_controller.cc (right): https://codereview.chromium.org/95133002/diff/480001/chrome/browser/extensions/dev_mode_bubble_controller.cc#newcode67 chrome/browser/extensions/dev_mode_bubble_controller.cc:67: const ...
7 years ago (2013-12-12 21:17:18 UTC) #13
Finnur
7 years ago (2013-12-13 21:29:48 UTC) #14
Thanks for the feedback. I'll follow this up with another CL to address some of
the structural changes and please note that I'm closing this issue and checking
it in in another CL (https://codereview.chromium.org/114153003/) as --similarity
changes always seem to prevent my CLs from applying cleanly on the bots).

https://codereview.chromium.org/95133002/diff/480001/chrome/browser/extension...
File chrome/browser/extensions/extension_message_bubble_controller.h (right):

https://codereview.chromium.org/95133002/diff/480001/chrome/browser/extension...
chrome/browser/extensions/extension_message_bubble_controller.h:69: const
ExtensionIdList& extension_id_list() const {
GetExtensionList is a convenience method to get at the names of the extensions.
This function, however, gives you the IDs. If I remove this function I can't get
at the extensions (I'd only have their name) so I have to have an ID function. I
considered removing the other one (GetExtensionList) but it encapsulates logic
and boiler plate that we'd have to sprinkle around at the call sites instead...

So, I ended up moving this function into the .cc file and making sure it always
works.

https://codereview.chromium.org/95133002/diff/480001/chrome/browser/ui/views/...
File chrome/browser/ui/views/extensions/extension_message_bubble_view.cc
(right):

https://codereview.chromium.org/95133002/diff/480001/chrome/browser/ui/views/...
chrome/browser/ui/views/extensions/extension_message_bubble_view.cc:76: void
ExtensionMessageBubbleView::MaybeShow(
I thought about that, but this gets messy as you add more bubbles. If we make
the controllers aware of each other then you need to update n code sites in code
you don't care about every time you add bubble n+1.

Bottom line: I think we can't fix this in a way everyone will be happy with
until we have some outside framework that controls the bubble priority and the
orderly showing of them.

https://codereview.chromium.org/95133002/diff/480001/chrome/browser/ui/views/...
chrome/browser/ui/views/extensions/extension_message_bubble_view.cc:112:
dev_mode_extensions->extension_id_list();
GetExtensionList returns names, not IDs. Changed it to GetExtensionIdList.

https://codereview.chromium.org/95133002/diff/340026/chrome/browser/extension...
File chrome/browser/extensions/extension_message_bubble_controller.cc (right):

https://codereview.chromium.org/95133002/diff/340026/chrome/browser/extension...
chrome/browser/extensions/extension_message_bubble_controller.cc:45: return
!list->empty();
Good point.

Powered by Google App Engine
This is Rietveld 408576698