OLD | NEW |
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 "extensions/common/features/simple_feature.h" | 14 #include "extensions/common/features/simple_feature.h" |
14 | 15 |
15 namespace extensions { | 16 namespace extensions { |
16 | 17 |
17 namespace { | 18 namespace { |
18 | 19 |
19 static const char kFeatureChannelKey[] = "channel"; | 20 static const char kFeatureChannelKey[] = "channel"; |
20 | 21 |
21 struct Mappings { | 22 struct Mappings { |
22 Mappings() { | 23 Mappings() { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 base::StringPrintf( | 92 base::StringPrintf( |
92 "'%s' requires Google Chrome %s channel or newer, but this is the " | 93 "'%s' requires Google Chrome %s channel or newer, but this is the " |
93 "%s channel.", | 94 "%s channel.", |
94 feature()->name().c_str(), GetChannelName(channel_).c_str(), | 95 feature()->name().c_str(), GetChannelName(channel_).c_str(), |
95 GetChannelName(GetCurrentChannel()).c_str())); | 96 GetChannelName(GetCurrentChannel()).c_str())); |
96 } | 97 } |
97 return Feature::Availability(Feature::IS_AVAILABLE, std::string()); | 98 return Feature::Availability(Feature::IS_AVAILABLE, std::string()); |
98 } | 99 } |
99 | 100 |
100 } // namespace extensions | 101 } // namespace extensions |
OLD | NEW |