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

Unified Diff: extensions/common/features/complex_feature.cc

Issue 2193693003: Further reduction of feature_compiler.py generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@test-with-leiz
Patch Set: . Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: extensions/common/features/complex_feature.cc
diff --git a/extensions/common/features/complex_feature.cc b/extensions/common/features/complex_feature.cc
index 5f041dbbc982786192cf3db7d81f36cc041dcbc5..a270e1c770e6b227bdb595ed39ea790c6bd81f8d 100644
--- a/extensions/common/features/complex_feature.cc
+++ b/extensions/common/features/complex_feature.cc
@@ -4,9 +4,11 @@
#include "extensions/common/features/complex_feature.h"
+#include "base/stl_util.h"
+
namespace extensions {
-ComplexFeature::ComplexFeature(std::unique_ptr<FeatureList> features) {
+ComplexFeature::ComplexFeature(FeatureList* features) {
DCHECK_GT(features->size(), 0UL);
features_.swap(*features);
no_parent_ = features_[0]->no_parent();
@@ -28,6 +30,7 @@ ComplexFeature::ComplexFeature(std::unique_ptr<FeatureList> features) {
}
ComplexFeature::~ComplexFeature() {
+ STLDeleteElements(&features_);
Devlin 2016/07/29 18:50:14 This makes me a bit sad. Since we control the con
scottmg 2016/07/29 20:05:04 Is something like this what you had in mind? I'm
}
Feature::Availability ComplexFeature::IsAvailableToManifest(

Powered by Google App Engine
This is Rietveld 408576698