Commit 25052a5d authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions] Enable the "action" manifest key on Canary

Most (though not all) support for the "action" key is complete. Promote
it to Canary to enable easier testing for developers (so folks don't
have to build Chromium from scratch).

Bug: 893373
Change-Id: I671e87fbf55aa9f4e716e41277288261be7637b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2258575Reviewed-by: default avatarDavid Bertoni <dbertoni@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#781549}
parent b0e04b8d
......@@ -12,7 +12,7 @@
"extension_types": ["shared_module"]
},
"action": {
"channel": "trunk",
"channel": "canary",
"extension_types": ["extension"]
},
"app.icon_color": {
......
......@@ -54,13 +54,19 @@ const ActionInfo* GetActionInfoOfType(const Extension& extension,
std::unique_ptr<ScopedCurrentChannel> GetOverrideChannelForActionType(
ActionInfo::Type action_type) {
std::unique_ptr<ScopedCurrentChannel> channel;
// The "action" key is currently restricted to trunk. Use a fake channel iff
// we're testing that key, so that we still get multi-channel coverage for
// browser and page actions.
// The "action" key is currently restricted to canary. Use a fake channel iff
// it would be restricted otherwise. This way, we still get all-channel
// coverage for browser and page actions, and cover all channels that "action"
// is supported in.
constexpr version_info::Channel kMaxChannelForActionKey =
version_info::Channel::CANARY;
switch (action_type) {
case ActionInfo::TYPE_ACTION:
channel = std::make_unique<ScopedCurrentChannel>(
version_info::Channel::UNKNOWN);
if (GetCurrentChannel() > kMaxChannelForActionKey) {
channel =
std::make_unique<ScopedCurrentChannel>(kMaxChannelForActionKey);
}
break;
case ActionInfo::TYPE_PAGE:
case ActionInfo::TYPE_BROWSER:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment