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

Side by Side Diff: extensions/common/features/json_feature_provider_source.h

Issue 246423002: Split feature definitions into extensions and chrome features. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: repack2 Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef EXTENSIONS_COMMON_FEATURE_JSON_FEATURE_PROVIDER_SOURCE_H_
6 #define EXTENSIONS_COMMON_FEATURE_JSON_FEATURE_PROVIDER_SOURCE_H_
7
8 #include "base/values.h"
9
10 namespace extensions {
11
12 // A JSONFeatureProviderSource loads JSON dictionary files that
13 // define features.
14 class JSONFeatureProviderSource {
15 public:
16 explicit JSONFeatureProviderSource(const std::string& name);
17 ~JSONFeatureProviderSource();
18
19 // Adds the JSON dictionary file to this provider, merging its values with
20 // the current dictionary. Key collisions are treated as errors.
21 void LoadJSON(int resource_id);
22
23 // Returns the parsed dictionary.
24 const base::DictionaryValue& dictionary() { return dictionary_; }
25
26 private:
27 // The name of this feature type; only used for debugging.
28 const std::string name_;
29
30 base::DictionaryValue dictionary_;
31
32 DISALLOW_COPY_AND_ASSIGN(JSONFeatureProviderSource);
33 };
34
35 } // namespace extensions
36
37 #endif // EXTENSIONS_COMMON_FEATURE_JSON_FEATURE_PROVIDER_SOURCE_H_
OLDNEW
« no previous file with comments | « extensions/common/features/feature_provider.cc ('k') | extensions/common/features/json_feature_provider_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698