Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chrome_extensions_client.h" | 5 #include "chrome/common/extensions/chrome_extensions_client.h" |
| 6 | 6 |
| 7 #include "chrome/common/chrome_version_info.h" | 7 #include "chrome/common/chrome_version_info.h" |
| 8 #include "chrome/common/extensions/api/generated_schemas.h" | 8 #include "chrome/common/extensions/api/generated_schemas.h" |
| 9 #include "chrome/common/extensions/chrome_manifest_handlers.h" | 9 #include "chrome/common/extensions/chrome_manifest_handlers.h" |
| 10 #include "chrome/common/extensions/extension_constants.h" | 10 #include "chrome/common/extensions/extension_constants.h" |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 26 #include "extensions/common/features/permission_feature.h" | 26 #include "extensions/common/features/permission_feature.h" |
| 27 #include "extensions/common/features/simple_feature.h" | 27 #include "extensions/common/features/simple_feature.h" |
| 28 #include "extensions/common/manifest_constants.h" | 28 #include "extensions/common/manifest_constants.h" |
| 29 #include "extensions/common/manifest_handler.h" | 29 #include "extensions/common/manifest_handler.h" |
| 30 #include "extensions/common/permissions/api_permission_set.h" | 30 #include "extensions/common/permissions/api_permission_set.h" |
| 31 #include "extensions/common/permissions/permission_message.h" | 31 #include "extensions/common/permissions/permission_message.h" |
| 32 #include "extensions/common/permissions/permissions_info.h" | 32 #include "extensions/common/permissions/permissions_info.h" |
| 33 #include "extensions/common/url_pattern.h" | 33 #include "extensions/common/url_pattern.h" |
| 34 #include "extensions/common/url_pattern_set.h" | 34 #include "extensions/common/url_pattern_set.h" |
| 35 #include "extensions/grit/extensions_resources.h" | 35 #include "extensions/grit/extensions_resources.h" |
| 36 #include "grit/chromium_strings.h" | |
|
James Cook
2014/08/26 22:01:31
nit: I think we're using chrome/grit/chromium_stri
Xi Han
2014/08/27 13:32:54
Great catch, thanks!
| |
| 36 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 37 #include "url/gurl.h" | 38 #include "url/gurl.h" |
| 38 | 39 |
| 39 #if defined(ENABLE_EXTENSIONS) | 40 #if defined(ENABLE_EXTENSIONS) |
| 40 #include "chrome/grit/extensions_api_resources.h" | 41 #include "chrome/grit/extensions_api_resources.h" |
| 41 #endif | 42 #endif |
| 42 | 43 |
| 43 namespace extensions { | 44 namespace extensions { |
| 44 | 45 |
| 45 namespace { | 46 namespace { |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 93 // online courses and will be needed while the online educational programs | 94 // online courses and will be needed while the online educational programs |
| 94 // are in place. | 95 // are in place. |
| 95 scripting_whitelist_.push_back("angkfkebojeancgemegoedelbnjgcgme"); | 96 scripting_whitelist_.push_back("angkfkebojeancgemegoedelbnjgcgme"); |
| 96 } | 97 } |
| 97 | 98 |
| 98 const PermissionMessageProvider& | 99 const PermissionMessageProvider& |
| 99 ChromeExtensionsClient::GetPermissionMessageProvider() const { | 100 ChromeExtensionsClient::GetPermissionMessageProvider() const { |
| 100 return permission_message_provider_; | 101 return permission_message_provider_; |
| 101 } | 102 } |
| 102 | 103 |
| 104 const std::string ChromeExtensionsClient::GetProductName() { | |
| 105 return l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); | |
| 106 } | |
| 107 | |
| 103 scoped_ptr<FeatureProvider> ChromeExtensionsClient::CreateFeatureProvider( | 108 scoped_ptr<FeatureProvider> ChromeExtensionsClient::CreateFeatureProvider( |
| 104 const std::string& name) const { | 109 const std::string& name) const { |
| 105 scoped_ptr<FeatureProvider> provider; | 110 scoped_ptr<FeatureProvider> provider; |
| 106 scoped_ptr<JSONFeatureProviderSource> source( | 111 scoped_ptr<JSONFeatureProviderSource> source( |
| 107 CreateFeatureProviderSource(name)); | 112 CreateFeatureProviderSource(name)); |
| 108 if (name == "api") { | 113 if (name == "api") { |
| 109 provider.reset(new BaseFeatureProvider(source->dictionary(), | 114 provider.reset(new BaseFeatureProvider(source->dictionary(), |
| 110 CreateFeature<APIFeature>)); | 115 CreateFeature<APIFeature>)); |
| 111 } else if (name == "manifest") { | 116 } else if (name == "manifest") { |
| 112 provider.reset(new BaseFeatureProvider(source->dictionary(), | 117 provider.reset(new BaseFeatureProvider(source->dictionary(), |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 267 // Suppress fatal errors only on beta and stable channels. | 272 // Suppress fatal errors only on beta and stable channels. |
| 268 return GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV; | 273 return GetCurrentChannel() > chrome::VersionInfo::CHANNEL_DEV; |
| 269 } | 274 } |
| 270 | 275 |
| 271 // static | 276 // static |
| 272 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { | 277 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { |
| 273 return g_client.Pointer(); | 278 return g_client.Pointer(); |
| 274 } | 279 } |
| 275 | 280 |
| 276 } // namespace extensions | 281 } // namespace extensions |
| OLD | NEW |