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

Side by Side Diff: chrome/common/extensions/features/chrome_channel_feature_filter.cc

Issue 1469003002: Permissions channel filter should use IDS_PRODUCT_NAME (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/features/chrome_channel_feature_filter.h" 5 #include "chrome/common/extensions/features/chrome_channel_feature_filter.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/strings/stringprintf.h" 11 #include "base/strings/stringprintf.h"
12 #include "chrome/common/extensions/features/feature_channel.h" 12 #include "chrome/common/extensions/features/feature_channel.h"
13 #include "components/version_info/version_info.h" 13 #include "components/version_info/version_info.h"
14 #include "extensions/common/features/simple_feature.h" 14 #include "extensions/common/features/simple_feature.h"
15 #include "grit/chromium_strings.h"
16 #include "ui/base/l10n/l10n_util.h"
15 17
16 namespace extensions { 18 namespace extensions {
17 19
18 namespace { 20 namespace {
19 21
20 static const char kFeatureChannelKey[] = "channel"; 22 static const char kFeatureChannelKey[] = "channel";
21 23
22 struct Mappings { 24 struct Mappings {
23 Mappings() { 25 Mappings() {
24 channels["trunk"] = version_info::Channel::UNKNOWN; 26 channels["trunk"] = version_info::Channel::UNKNOWN;
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 Feature::Availability ChromeChannelFeatureFilter::IsAvailableToManifest( 85 Feature::Availability ChromeChannelFeatureFilter::IsAvailableToManifest(
84 const std::string& extension_id, 86 const std::string& extension_id,
85 Manifest::Type type, 87 Manifest::Type type,
86 Manifest::Location location, 88 Manifest::Location location,
87 int manifest_version, 89 int manifest_version,
88 Feature::Platform platfortm) const { 90 Feature::Platform platfortm) const {
89 if (channel_has_been_set_ && channel_ < GetCurrentChannel()) { 91 if (channel_has_been_set_ && channel_ < GetCurrentChannel()) {
90 return Feature::Availability( 92 return Feature::Availability(
91 Feature::UNSUPPORTED_CHANNEL, 93 Feature::UNSUPPORTED_CHANNEL,
92 base::StringPrintf( 94 base::StringPrintf(
93 "'%s' requires Google Chrome %s channel or newer, but this is the " 95 "'%s' requires %s %s channel or newer, but this is the "
94 "%s channel.", 96 "%s channel.",
95 feature()->name().c_str(), GetChannelName(channel_).c_str(), 97 feature()->name().c_str(),
96 GetChannelName(GetCurrentChannel()).c_str())); 98 l10n_util::GetStringUTF8(IDS_PRODUCT_NAME).c_str(),
99 GetChannelName(channel_).c_str()));
Reilly Grant (use Gerrit) 2015/11/23 19:23:32 This format string requires the current channel na
wmaslowski 2015/11/24 14:45:14 whoops - seems like I commited it before correctin
97 } 100 }
98 return Feature::Availability(Feature::IS_AVAILABLE, std::string()); 101 return Feature::Availability(Feature::IS_AVAILABLE, std::string());
99 } 102 }
100 103
101 } // namespace extensions 104 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698