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

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

Issue 224163002: Move core features code to //extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move tests Created 6 years, 8 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
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/base_feature_provider.h" 5 #include "extensions/common/features/base_feature_provider.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
11 #include "base/strings/string_split.h" 11 #include "base/strings/string_split.h"
12 #include "base/strings/string_util.h" 12 #include "base/strings/string_util.h"
13 #include "chrome/common/extensions/features/api_feature.h"
14 #include "chrome/common/extensions/features/complex_feature.h"
15 #include "chrome/common/extensions/features/manifest_feature.h"
16 #include "chrome/common/extensions/features/permission_feature.h"
17 #include "extensions/common/extensions_client.h" 13 #include "extensions/common/extensions_client.h"
14 #include "extensions/common/features/api_feature.h"
15 #include "extensions/common/features/complex_feature.h"
16 #include "extensions/common/features/manifest_feature.h"
17 #include "extensions/common/features/permission_feature.h"
18 #include "grit/common_resources.h" 18 #include "grit/common_resources.h"
19 #include "ui/base/resource/resource_bundle.h" 19 #include "ui/base/resource/resource_bundle.h"
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 namespace { 23 namespace {
24 24
25 template<class FeatureClass> 25 template<class FeatureClass>
26 SimpleFeature* CreateFeature() { 26 SimpleFeature* CreateFeature() {
27 SimpleFeature* feature = new FeatureClass(); 27 SimpleFeature* feature = new FeatureClass();
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 std::vector<Feature*> result; 240 std::vector<Feature*> result;
241 result.reserve(std::distance(first_child, after_children)); 241 result.reserve(std::distance(first_child, after_children));
242 for (FeatureMap::const_iterator it = first_child; it != after_children; 242 for (FeatureMap::const_iterator it = first_child; it != after_children;
243 ++it) { 243 ++it) {
244 result.push_back(it->second.get()); 244 result.push_back(it->second.get());
245 } 245 }
246 return result; 246 return result;
247 } 247 }
248 248
249 } // namespace extensions 249 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698