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/test/test_extensions_client.h" | 5 #include "extensions/test/test_extensions_client.h" |
6 | 6 |
7 #include "extensions/common/api/generated_schemas.h" | 7 #include "extensions/common/api/generated_schemas.h" |
8 #include "extensions/common/common_manifest_handlers.h" | 8 #include "extensions/common/common_manifest_handlers.h" |
9 #include "extensions/common/features/api_feature.h" | 9 #include "extensions/common/features/api_feature.h" |
10 #include "extensions/common/features/base_feature_provider.h" | 10 #include "extensions/common/features/base_feature_provider.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 static ExtensionsAPIPermissions extensions_api_permissions; | 48 static ExtensionsAPIPermissions extensions_api_permissions; |
49 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions); | 49 PermissionsInfo::GetInstance()->AddProvider(extensions_api_permissions); |
50 } | 50 } |
51 | 51 |
52 const PermissionMessageProvider& | 52 const PermissionMessageProvider& |
53 TestExtensionsClient::GetPermissionMessageProvider() const { | 53 TestExtensionsClient::GetPermissionMessageProvider() const { |
54 static TestPermissionMessageProvider provider; | 54 static TestPermissionMessageProvider provider; |
55 return provider; | 55 return provider; |
56 } | 56 } |
57 | 57 |
| 58 const std::string TestExtensionsClient::GetProductName() { |
| 59 return "extensions_test"; |
| 60 } |
| 61 |
58 scoped_ptr<FeatureProvider> TestExtensionsClient::CreateFeatureProvider( | 62 scoped_ptr<FeatureProvider> TestExtensionsClient::CreateFeatureProvider( |
59 const std::string& name) const { | 63 const std::string& name) const { |
60 scoped_ptr<FeatureProvider> provider; | 64 scoped_ptr<FeatureProvider> provider; |
61 scoped_ptr<JSONFeatureProviderSource> source( | 65 scoped_ptr<JSONFeatureProviderSource> source( |
62 CreateFeatureProviderSource(name)); | 66 CreateFeatureProviderSource(name)); |
63 if (name == "api") { | 67 if (name == "api") { |
64 provider.reset(new BaseFeatureProvider(source->dictionary(), | 68 provider.reset(new BaseFeatureProvider(source->dictionary(), |
65 CreateFeature<APIFeature>)); | 69 CreateFeature<APIFeature>)); |
66 } else if (name == "manifest") { | 70 } else if (name == "manifest") { |
67 provider.reset(new BaseFeatureProvider(source->dictionary(), | 71 provider.reset(new BaseFeatureProvider(source->dictionary(), |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 } | 136 } |
133 | 137 |
134 void TestExtensionsClient::RegisterAPISchemaResources(ExtensionAPI* api) const { | 138 void TestExtensionsClient::RegisterAPISchemaResources(ExtensionAPI* api) const { |
135 } | 139 } |
136 | 140 |
137 bool TestExtensionsClient::ShouldSuppressFatalErrors() const { | 141 bool TestExtensionsClient::ShouldSuppressFatalErrors() const { |
138 return true; | 142 return true; |
139 } | 143 } |
140 | 144 |
141 } // namespace extensions | 145 } // namespace extensions |
OLD | NEW |