| 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 "chrome/common/extensions/features/chrome_channel_feature_filter.h" | 5 #include "chrome/common/extensions/features/chrome_channel_feature_filter.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/common/chrome_version_info.h" | |
| 12 #include "chrome/common/extensions/features/feature_channel.h" | 11 #include "chrome/common/extensions/features/feature_channel.h" |
| 12 #include "components/version_info/version_info.h" |
| 13 #include "extensions/common/features/base_feature_provider.h" | 13 #include "extensions/common/features/base_feature_provider.h" |
| 14 #include "extensions/common/features/complex_feature.h" | 14 #include "extensions/common/features/complex_feature.h" |
| 15 #include "extensions/common/features/permission_feature.h" | 15 #include "extensions/common/features/permission_feature.h" |
| 16 #include "extensions/common/features/simple_feature.h" | 16 #include "extensions/common/features/simple_feature.h" |
| 17 #include "extensions/common/value_builder.h" | 17 #include "extensions/common/value_builder.h" |
| 18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 19 | 19 |
| 20 using chrome::VersionInfo; | |
| 21 | |
| 22 namespace extensions { | 20 namespace extensions { |
| 23 namespace { | 21 namespace { |
| 24 | 22 |
| 25 template <class FeatureClass> | 23 template <class FeatureClass> |
| 26 SimpleFeature* CreateFeature() { | 24 SimpleFeature* CreateFeature() { |
| 27 SimpleFeature* feature = new FeatureClass(); | 25 SimpleFeature* feature = new FeatureClass(); |
| 28 feature->AddFilter( | 26 feature->AddFilter( |
| 29 scoped_ptr<SimpleFeatureFilter>(new ChromeChannelFeatureFilter(feature))); | 27 scoped_ptr<SimpleFeatureFilter>(new ChromeChannelFeatureFilter(feature))); |
| 30 return feature; | 28 return feature; |
| 31 } | 29 } |
| (...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 Feature::IS_AVAILABLE, | 282 Feature::IS_AVAILABLE, |
| 285 feature->IsAvailableToManifest("1", | 283 feature->IsAvailableToManifest("1", |
| 286 Manifest::TYPE_EXTENSION, | 284 Manifest::TYPE_EXTENSION, |
| 287 Manifest::INVALID_LOCATION, | 285 Manifest::INVALID_LOCATION, |
| 288 Feature::UNSPECIFIED_PLATFORM, | 286 Feature::UNSPECIFIED_PLATFORM, |
| 289 Feature::GetCurrentPlatform()).result()); | 287 Feature::GetCurrentPlatform()).result()); |
| 290 } | 288 } |
| 291 } | 289 } |
| 292 | 290 |
| 293 } // namespace extensions | 291 } // namespace extensions |
| OLD | NEW |