| OLD | NEW |
| 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 Loading... |
| 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); | |
| 71 } | |
| 72 | |
| 73 } // namespace extensions | 69 } // namespace extensions |
| OLD | NEW |