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

Side by Side Diff: extensions/common/features/feature_provider.cc

Issue 293943002: Clean up TestFeaturesNativeHandler to use the ExtensionsClient's JSON feature sources. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
« no previous file with comments | « extensions/common/features/feature_provider.h ('k') | extensions/common/manifest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "extensions/common/features/feature_provider.h" 5 #include "extensions/common/features/feature_provider.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 29 matching lines...) Expand all
40 FeatureProviderMap; 40 FeatureProviderMap;
41 41
42 FeatureProviderMap feature_providers_; 42 FeatureProviderMap feature_providers_;
43 }; 43 };
44 44
45 base::LazyInstance<Static> g_static = LAZY_INSTANCE_INITIALIZER; 45 base::LazyInstance<Static> g_static = LAZY_INSTANCE_INITIALIZER;
46 46
47 } // namespace 47 } // namespace
48 48
49 // static 49 // static
50 FeatureProvider* FeatureProvider::GetByName(const std::string& name) { 50 const FeatureProvider* FeatureProvider::GetByName(const std::string& name) {
51 return g_static.Get().GetFeatures(name); 51 return g_static.Get().GetFeatures(name);
52 } 52 }
53 53
54 // static 54 // static
55 FeatureProvider* FeatureProvider::GetAPIFeatures() { 55 const FeatureProvider* FeatureProvider::GetAPIFeatures() {
56 return GetByName("api"); 56 return GetByName("api");
57 } 57 }
58 58
59 // static 59 // static
60 FeatureProvider* FeatureProvider::GetManifestFeatures() { 60 const FeatureProvider* FeatureProvider::GetManifestFeatures() {
61 return GetByName("manifest"); 61 return GetByName("manifest");
62 } 62 }
63 63
64 // static 64 // static
65 FeatureProvider* FeatureProvider::GetPermissionFeatures() { 65 const FeatureProvider* FeatureProvider::GetPermissionFeatures() {
66 return GetByName("permission"); 66 return GetByName("permission");
67 } 67 }
68 68
69 } // namespace extensions 69 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/common/features/feature_provider.h ('k') | extensions/common/manifest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698