Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / extensions / common / features / json_feature_provider_source.h
blob7e41cca8b8223914ec111d463e8adbde2286164a
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
3 // found in the LICENSE file.
5 #ifndef EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_SOURCE_H_
6 #define EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_SOURCE_H_
8 #include <string>
10 #include "base/values.h"
12 namespace extensions {
14 // A JSONFeatureProviderSource loads JSON dictionary files that
15 // define features.
16 class JSONFeatureProviderSource {
17 public:
18 explicit JSONFeatureProviderSource(const std::string& name);
19 ~JSONFeatureProviderSource();
21 // Adds the JSON dictionary file to this provider, merging its values with
22 // the current dictionary. Key collisions are treated as errors.
23 void LoadJSON(int resource_id);
25 // Returns the parsed dictionary.
26 const base::DictionaryValue& dictionary() { return dictionary_; }
28 private:
29 // The name of this feature type; only used for debugging.
30 const std::string name_;
32 base::DictionaryValue dictionary_;
34 DISALLOW_COPY_AND_ASSIGN(JSONFeatureProviderSource);
37 } // namespace extensions
39 #endif // EXTENSIONS_COMMON_FEATURES_JSON_FEATURE_PROVIDER_SOURCE_H_