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

Unified Diff: chrome/common/extensions/command.cc

Issue 197783005: Enable the Commands API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/common/extensions/docs/templates/intros/commands.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/command.cc
diff --git a/chrome/common/extensions/command.cc b/chrome/common/extensions/command.cc
index 5ebf3fc015760d17c03edfc6793d27e7ab283ffc..f3ddfb4594885ffa8dfd4b1d80d96e8069bafa28 100644
--- a/chrome/common/extensions/command.cc
+++ b/chrome/common/extensions/command.cc
@@ -9,7 +9,6 @@
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "base/values.h"
-#include "chrome/common/chrome_version_info.h" // TODO(finnur): Remove.
#include "extensions/common/error_utils.h"
#include "extensions/common/extension.h"
#include "extensions/common/feature_switch.h"
@@ -448,8 +447,7 @@ bool Command::Parse(const base::DictionaryValue* command,
// Check if this is a global or a regular shortcut.
bool global = false;
- if (FeatureSwitch::global_commands()->IsEnabled() &&
- chrome::VersionInfo::GetChannel() <= chrome::VersionInfo::CHANNEL_DEV)
+ if (FeatureSwitch::global_commands()->IsEnabled())
command->GetBoolean(keys::kGlobal, &global);
// Normalize the suggestions.
@@ -542,13 +540,8 @@ base::DictionaryValue* Command::ToValue(const Extension* extension,
extension_data->SetBoolean("global", global());
extension_data->SetBoolean("extension_action", extension_action);
- if (FeatureSwitch::global_commands()->IsEnabled()) {
- // TODO(finnur): This is to make sure we don't show the config UI beyond
- // dev and will be removed when we launch.
- static bool stable_or_beta =
- chrome::VersionInfo::GetChannel() >= chrome::VersionInfo::CHANNEL_BETA;
- extension_data->SetBoolean("scope_ui_visible", !stable_or_beta);
- }
+ if (FeatureSwitch::global_commands()->IsEnabled())
+ extension_data->SetBoolean("scope_ui_visible", true);
return extension_data;
}
« no previous file with comments | « no previous file | chrome/common/extensions/docs/templates/intros/commands.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698