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

Side by Side Diff: extensions/common/features/base_feature_provider.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, 4 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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/base_feature_provider.h" 5 #include "extensions/common/features/base_feature_provider.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/strings/string_split.h" 9 #include "base/strings/string_split.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 result.push_back(it->second.get()); 59 result.push_back(it->second.get());
60 } 60 }
61 return result; 61 return result;
62 } 62 }
63 63
64 void BaseFeatureProvider::AddFeature(base::StringPiece name, 64 void BaseFeatureProvider::AddFeature(base::StringPiece name,
65 std::unique_ptr<Feature> feature) { 65 std::unique_ptr<Feature> feature) {
66 features_[name.as_string()] = std::move(feature); 66 features_[name.as_string()] = std::move(feature);
67 } 67 }
68 68
69 void BaseFeatureProvider::AddFeature(base::StringPiece name, Feature* feature) {
70 features_[name.as_string()] = std::unique_ptr<Feature>(feature);
Devlin 2016/07/29 20:13:49 For the record, this is what I was talking about w
71 }
72
69 } // namespace extensions 73 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698