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

Issue 2559323002: Add a policy to always show the Cast toolbar icon (Closed)

Created:
4 years ago by takumif
Modified:
3 years, 10 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, feature-media-reviews_chromium.org, mcasas+watch+vc_chromium.org, media-router+watch_chromium.org, tnagel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add a policy to always show the Cast toolbar icon This CL adds a policy "ShowCastIconInToolbar," which will force the media router toolbar action to be always shown in the toolbar or the overflow menu when enabled. When the policy is enabled, the action's context menu item "Always show icon" will be replaced by "Added by your administrator," similar to the item "Installed by your administrator" for policy-enabled extensions. This menu item will always be disabled. This CL adds a new pref with ID prefs::kShowCastIconInToolbar for the policy. When we later remove ComponentMigrationHelper and the prefs associated with it that we currently use to pin the media router action to the toolbar, we can use prefs::kShowCastIconInToolbar to record user-initiated pinning of the action to the toolbar. BUG=666003 Review-Url: https://codereview.chromium.org/2559323002 Cr-Commit-Position: refs/heads/master@{#447289} Committed: https://chromium.googlesource.com/chromium/src/+/1a5f2851a8a4cf5222a676dc8bcc7d52fc29a7f1

Patch Set 1 #

Total comments: 8

Patch Set 2 : Rebase #

Patch Set 3 : Address Derek's comments #

Total comments: 4

Patch Set 4 : Rebase #

Patch Set 5 : Address Derek's comments #

Total comments: 11

Patch Set 6 : Rebase #

Patch Set 7 : Address Mike's comments #

Patch Set 8 : Rebase #

Total comments: 7

Patch Set 9 : Address Julian's comments #

Patch Set 10 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+204 lines, -26 lines) Patch
M chrome/app/chrome_command_ids.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/app/media_router_strings.grdp View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/policy/configuration_policy_handler_list_factory.cc View 1 2 3 4 5 6 7 8 9 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/policy/policy_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +46 lines, -0 lines 0 comments Download
M chrome/browser/profiles/profile_impl.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_action_controller.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_action_controller.cc View 1 2 3 4 3 chunks +17 lines, -3 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_contextual_menu.h View 1 2 3 4 5 6 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_contextual_menu.cc View 1 2 3 4 5 6 5 chunks +26 lines, -8 lines 0 comments Download
M chrome/browser/ui/toolbar/media_router_contextual_menu_unittest.cc View 2 chunks +25 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/test/data/policy/policy_test_cases.json View 1 2 3 4 5 6 7 8 9 1 chunk +8 lines, -0 lines 0 comments Download
M components/policy/resources/policy_templates.json View 1 2 3 4 5 6 7 8 9 2 chunks +43 lines, -14 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 50 (28 generated)
takumif
Please take a look. I'll send this out to all the owners once it looks ...
4 years ago (2016-12-13 19:08:32 UTC) #6
imcheng
Overall looks good. 2 questions: - what happens if an admin enables the MediaRouterAction policy, ...
4 years ago (2016-12-15 19:57:39 UTC) #7
takumif
On 2016/12/15 19:57:39, imcheng wrote: > Overall looks good. 2 questions: > - what happens ...
4 years ago (2016-12-15 22:02:51 UTC) #10
takumif
https://codereview.chromium.org/2559323002/diff/40001/chrome/browser/policy/policy_browsertest.cc File chrome/browser/policy/policy_browsertest.cc (right): https://codereview.chromium.org/2559323002/diff/40001/chrome/browser/policy/policy_browsertest.cc#newcode232 chrome/browser/policy/policy_browsertest.cc:232: #if !defined(OS_ANDROID) On 2016/12/15 19:57:38, imcheng wrote: > #if ...
4 years ago (2016-12-15 22:04:14 UTC) #11
imcheng
lgtm https://codereview.chromium.org/2559323002/diff/120001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc File chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc (right): https://codereview.chromium.org/2559323002/diff/120001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc#newcode50 chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc:50: component_ids.insert(kMediaRouterActionId); nit: blank line before return makes the ...
4 years ago (2016-12-20 19:34:35 UTC) #12
takumif
anthonyvd@chromium.org: Please review changes in profile_impl.cc grt@chromium.org: Please review changes in chrome_command_ids.h tnagel@chromium.org: Please review ...
3 years, 11 months ago (2016-12-28 19:55:03 UTC) #15
takumif
anthonyvd@chromium.org: Please review changes in profile_impl.cc grt@chromium.org: Please review changes in chrome_command_ids.h tnagel@chromium.org: Please review ...
3 years, 11 months ago (2016-12-28 19:55:03 UTC) #16
takumif
anthonyvd@chromium.org: Please review changes in profile_impl.cc grt@chromium.org: Please review changes in chrome_command_ids.h tnagel@chromium.org: Please review ...
3 years, 11 months ago (2016-12-28 19:55:06 UTC) #17
takumif
anthonyvd@chromium.org: Please review changes in profile_impl.cc grt@chromium.org: Please review changes in chrome_command_ids.h tnagel@chromium.org: Please review ...
3 years, 11 months ago (2016-12-28 19:55:06 UTC) #18
takumif
jwd@chromium.org: Please review changes in histograms.xml. Thanks!
3 years, 11 months ago (2016-12-28 19:56:39 UTC) #19
grt (UTC plus 2)
chrome/app/chrome_command_ids.h lgtm
3 years, 11 months ago (2017-01-02 08:19:00 UTC) #20
anthonyvd
c/b/profiles/ lgtm
3 years, 11 months ago (2017-01-02 14:54:24 UTC) #21
jwd
histograms LGTM
3 years, 11 months ago (2017-01-03 20:58:36 UTC) #22
msw
Mostly minor comments; thanks for your patience on my review. https://codereview.chromium.org/2559323002/diff/160001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc File chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc (right): https://codereview.chromium.org/2559323002/diff/160001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc#newcode49 ...
3 years, 11 months ago (2017-01-05 01:14:58 UTC) #23
takumif
Thanks for reviewing! https://codereview.chromium.org/2559323002/diff/160001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc File chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc (right): https://codereview.chromium.org/2559323002/diff/160001/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc#newcode49 chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc:49: MediaRouterActionController::IsActionShownByPolicy(profile)) On 2017/01/05 01:14:57, msw (vacation ...
3 years, 11 months ago (2017-01-06 22:06:57 UTC) #25
msw
lgtm https://codereview.chromium.org/2559323002/diff/160001/chrome/browser/ui/toolbar/media_router_contextual_menu.h File chrome/browser/ui/toolbar/media_router_contextual_menu.h (right): https://codereview.chromium.org/2559323002/diff/160001/chrome/browser/ui/toolbar/media_router_contextual_menu.h#newcode24 chrome/browser/ui/toolbar/media_router_contextual_menu.h:24: MediaRouterContextualMenu(Browser* browser, bool shown_by_policy); On 2017/01/06 22:06:57, takumif ...
3 years, 11 months ago (2017-01-06 23:01:23 UTC) #26
takumif
pastarmovj@, please take a look at chrome/browser/policy/* and components/policy/resources/policy_templates.json. Thanks!
3 years, 11 months ago (2017-01-24 21:39:43 UTC) #28
pastarmovj
https://codereview.chromium.org/2559323002/diff/240001/chrome/browser/policy/policy_browsertest.cc File chrome/browser/policy/policy_browsertest.cc (right): https://codereview.chromium.org/2559323002/diff/240001/chrome/browser/policy/policy_browsertest.cc#newcode230 chrome/browser/policy/policy_browsertest.cc:230: #if defined(ENABLE_MEDIA_ROUTER) nit: you can combine the two if-defs ...
3 years, 11 months ago (2017-01-24 23:03:47 UTC) #29
takumif
Thanks for reviewing! https://codereview.chromium.org/2559323002/diff/240001/chrome/browser/policy/policy_browsertest.cc File chrome/browser/policy/policy_browsertest.cc (right): https://codereview.chromium.org/2559323002/diff/240001/chrome/browser/policy/policy_browsertest.cc#newcode230 chrome/browser/policy/policy_browsertest.cc:230: #if defined(ENABLE_MEDIA_ROUTER) On 2017/01/24 23:03:46, pastarmovj ...
3 years, 10 months ago (2017-01-26 23:12:35 UTC) #31
pastarmovj
lgtm https://codereview.chromium.org/2559323002/diff/240001/components/policy/resources/policy_templates.json File components/policy/resources/policy_templates.json (right): https://codereview.chromium.org/2559323002/diff/240001/components/policy/resources/policy_templates.json#newcode9116 components/policy/resources/policy_templates.json:9116: 'desc': '''If this is set to true or ...
3 years, 10 months ago (2017-01-26 23:18:13 UTC) #32
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/2559323002/280001
3 years, 10 months ago (2017-01-31 19:03:41 UTC) #47
commit-bot: I haz the power
3 years, 10 months ago (2017-01-31 19:11:34 UTC) #50
Message was sent while issue was closed.
Committed patchset #10 (id:280001) as
https://chromium.googlesource.com/chromium/src/+/1a5f2851a8a4cf5222a676dc8bcc...

Powered by Google App Engine
This is Rietveld 408576698