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

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

Issue 1269773002: Cleanup VersionInfo after componentization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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 unified diff | Download patch
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 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_CHROME_CHANNEL_FEATURE_FILTER_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_FEATURES_CHROME_CHANNEL_FEATURE_FILTER_H_
6 #define CHROME_COMMON_EXTENSIONS_FEATURES_CHROME_CHANNEL_FEATURE_FILTER_H_ 6 #define CHROME_COMMON_EXTENSIONS_FEATURES_CHROME_CHANNEL_FEATURE_FILTER_H_
7 7
8 #include "chrome/common/chrome_version_info.h"
9 #include "extensions/common/features/simple_feature_filter.h" 8 #include "extensions/common/features/simple_feature_filter.h"
10 9
10 namespace version_info {
11 enum class Channel;
12 }
13
11 namespace extensions { 14 namespace extensions {
12 15
13 // This filter parses a "channel" key from feature value data and makes features 16 // This filter parses a "channel" key from feature value data and makes features
14 // unavailable if they aren't stable enough for the current channel. 17 // unavailable if they aren't stable enough for the current channel.
15 class ChromeChannelFeatureFilter : public SimpleFeatureFilter { 18 class ChromeChannelFeatureFilter : public SimpleFeatureFilter {
16 public: 19 public:
17 explicit ChromeChannelFeatureFilter(SimpleFeature* feature); 20 explicit ChromeChannelFeatureFilter(SimpleFeature* feature);
18 ~ChromeChannelFeatureFilter() override; 21 ~ChromeChannelFeatureFilter() override;
19 22
20 // SimpleFeatureFilter implementation. 23 // SimpleFeatureFilter implementation.
21 std::string Parse(const base::DictionaryValue* value) override; 24 std::string Parse(const base::DictionaryValue* value) override;
22 Feature::Availability IsAvailableToManifest( 25 Feature::Availability IsAvailableToManifest(
23 const std::string& extension_id, 26 const std::string& extension_id,
24 Manifest::Type type, 27 Manifest::Type type,
25 Manifest::Location location, 28 Manifest::Location location,
26 int manifest_version, 29 int manifest_version,
27 Feature::Platform platform) const override; 30 Feature::Platform platform) const override;
28 31
29 private: 32 private:
30 bool channel_has_been_set_; 33 bool channel_has_been_set_;
31 version_info::Channel channel_; 34 version_info::Channel channel_;
32 }; 35 };
33 36
34 } // namespace extensions 37 } // namespace extensions
35 38
36 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_CHROME_CHANNEL_FEATURE_FILTER_H_ 39 #endif // CHROME_COMMON_EXTENSIONS_FEATURES_CHROME_CHANNEL_FEATURE_FILTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698