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

Issue 2613713005: Make ToolbarActionsModel own ComponentToolbarActionsFactory (Closed)

Created:
3 years, 11 months ago by takumif
Modified:
3 years, 9 months ago
Reviewers:
msw, Devlin, pastarmovj, apacible
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, tfarina, extensions-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ToolbarActionsModel own ComponentToolbarActionsFactory This CL makes ToolbarActionsModel own ComponentToolbarActionsFactory, which used to be a stateless singleton. This change also makes ComponentToolbarActionsFactory keep track of component actions that call ToolbarActionsModel::AddComponentAction() before ToolbarActionsModel is initialized. Those actions are added to the set obtained via ComponentToolbarActionsFactory::GetInitialComponentIds(), and are added to the toolbar in ToolbarActionsModel::Populate(). MockComponentToolbarActionsFactory and tests are modified to reflect the changes to ComponentToolbarActionsFactory. BUG=660972 Review-Url: https://codereview.chromium.org/2613713005 Cr-Commit-Position: refs/heads/master@{#452992} Committed: https://chromium.googlesource.com/chromium/src/+/e6007d0b43c4a3ee34598349aa3246086f451feb

Patch Set 1 #

Total comments: 48

Patch Set 2 : Rebase with ComponentMigrationHelper removal #

Patch Set 3 : Rebase with 2693063003 #

Patch Set 4 : Address Devlin and Mike's comments #

Total comments: 4

Patch Set 5 : Address Mike's comments #

Total comments: 1

Patch Set 6 : Add a newline #

Patch Set 7 : Fix buildbot failure #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+153 lines, -101 lines) Patch
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 2 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/component_toolbar_actions_browsertest.cc View 1 2 3 3 chunks +12 lines, -17 lines 0 comments Download
M chrome/browser/ui/toolbar/component_toolbar_actions_factory.h View 1 2 3 4 4 chunks +21 lines, -14 lines 0 comments Download
M chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc View 1 2 3 4 5 5 chunks +22 lines, -31 lines 0 comments Download
M chrome/browser/ui/toolbar/component_toolbar_actions_factory_unittest.cc View 1 2 3 4 chunks +28 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_contextual_menu.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 2 comments Download
M chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/ui/toolbar/mock_component_toolbar_actions_factory.cc View 1 2 3 2 chunks +5 lines, -8 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_model.h View 1 2 3 4 chunks +11 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_model.cc View 1 2 3 8 chunks +20 lines, -11 lines 0 comments Download
M chrome/browser/ui/toolbar/toolbar_actions_model_unittest.cc View 1 2 3 6 chunks +26 lines, -14 lines 0 comments Download

Messages

Total messages: 49 (33 generated)
takumif
Please take a look, thank you!
3 years, 11 months ago (2017-01-06 22:26:11 UTC) #9
msw
When citing multiple reviewers, please clarify which portion of the CL each are responsible for ...
3 years, 11 months ago (2017-01-10 22:52:44 UTC) #10
Devlin
https://codereview.chromium.org/2613713005/diff/60001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h File chrome/browser/ui/toolbar/component_toolbar_actions_factory.h (right): https://codereview.chromium.org/2613713005/diff/60001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h#newcode47 chrome/browser/ui/toolbar/component_toolbar_actions_factory.h:47: // Returns a collection of controllers for component actions. ...
3 years, 11 months ago (2017-01-10 23:07:11 UTC) #11
Devlin
although separately, there's discussion on the bug about just removing the migration helper - which ...
3 years, 11 months ago (2017-01-10 23:07:42 UTC) #12
msw
+1 for removing the migration code if possible. I don't understand this code terribly well, ...
3 years, 11 months ago (2017-01-10 23:24:00 UTC) #13
takumif
Thank you for the reviews. You two are right, this CL would be simpler after ...
3 years, 11 months ago (2017-01-11 02:15:26 UTC) #14
takumif
Now that ComponentMigrationHelper has been removed and this CL has been simplified, I'd like to ...
3 years, 10 months ago (2017-02-17 03:22:52 UTC) #20
pastarmovj
policy_browsertest LGTM.
3 years, 10 months ago (2017-02-17 10:11:42 UTC) #21
Devlin
lgtm
3 years, 10 months ago (2017-02-17 16:04:58 UTC) #22
msw
Thanks for the cleanup and patience with my review. I just one question and one ...
3 years, 10 months ago (2017-02-17 23:55:06 UTC) #23
takumif
https://codereview.chromium.org/2613713005/diff/150001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc File chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc (right): https://codereview.chromium.org/2613713005/diff/150001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc#newcode39 chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc:39: initial_ids_.insert(kMediaRouterActionId); On 2017/02/17 23:55:05, msw wrote: > If this ...
3 years, 10 months ago (2017-02-18 01:04:16 UTC) #24
msw
lgtm with a nit https://codereview.chromium.org/2613713005/diff/170001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc File chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc (right): https://codereview.chromium.org/2613713005/diff/170001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc#newcode40 chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc:40: ComponentToolbarActionsFactory::~ComponentToolbarActionsFactory() {} nit: add a ...
3 years, 10 months ago (2017-02-18 01:06:09 UTC) #25
apacible
lgtm https://codereview.chromium.org/2613713005/diff/210001/chrome/browser/ui/toolbar/media_router_contextual_menu.cc File chrome/browser/ui/toolbar/media_router_contextual_menu.cc (right): https://codereview.chromium.org/2613713005/diff/210001/chrome/browser/ui/toolbar/media_router_contextual_menu.cc#newcode30 chrome/browser/ui/toolbar/media_router_contextual_menu.cc:30: #include "ui/gfx/vector_icons_public.h" Is this needed?
3 years, 9 months ago (2017-02-24 19:51:22 UTC) #38
takumif
https://codereview.chromium.org/2613713005/diff/210001/chrome/browser/ui/toolbar/media_router_contextual_menu.cc File chrome/browser/ui/toolbar/media_router_contextual_menu.cc (right): https://codereview.chromium.org/2613713005/diff/210001/chrome/browser/ui/toolbar/media_router_contextual_menu.cc#newcode30 chrome/browser/ui/toolbar/media_router_contextual_menu.cc:30: #include "ui/gfx/vector_icons_public.h" On 2017/02/24 19:51:22, apacible wrote: > Is ...
3 years, 9 months ago (2017-02-24 19:56:56 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2613713005/210001
3 years, 9 months ago (2017-02-24 23:21:59 UTC) #46
commit-bot: I haz the power
3 years, 9 months ago (2017-02-24 23:27:44 UTC) #49
Message was sent while issue was closed.
Committed patchset #7 (id:210001) as
https://chromium.googlesource.com/chromium/src/+/e6007d0b43c4a3ee34598349aa32...

Powered by Google App Engine
This is Rietveld 408576698