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

Side by Side Diff: chrome/common/extensions/chrome_extensions_client.cc

Issue 503033002: Move ExtensionWarningService and ExtensionsWarningSet to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@3_web_view_internal
Patch Set: rebase Created 6 years, 3 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 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"
11 #include "chrome/common/extensions/features/chrome_channel_feature_filter.h" 11 #include "chrome/common/extensions/features/chrome_channel_feature_filter.h"
12 #include "chrome/common/extensions/features/feature_channel.h" 12 #include "chrome/common/extensions/features/feature_channel.h"
13 #include "chrome/common/url_constants.h" 13 #include "chrome/common/url_constants.h"
14 #include "chrome/grit/chromium_strings.h"
14 #include "chrome/grit/common_resources.h" 15 #include "chrome/grit/common_resources.h"
15 #include "chrome/grit/generated_resources.h" 16 #include "chrome/grit/generated_resources.h"
16 #include "content/public/common/url_constants.h" 17 #include "content/public/common/url_constants.h"
17 #include "extensions/common/api/generated_schemas.h" 18 #include "extensions/common/api/generated_schemas.h"
18 #include "extensions/common/common_manifest_handlers.h" 19 #include "extensions/common/common_manifest_handlers.h"
19 #include "extensions/common/extension.h" 20 #include "extensions/common/extension.h"
20 #include "extensions/common/extension_api.h" 21 #include "extensions/common/extension_api.h"
21 #include "extensions/common/features/api_feature.h" 22 #include "extensions/common/features/api_feature.h"
22 #include "extensions/common/features/base_feature_provider.h" 23 #include "extensions/common/features/base_feature_provider.h"
23 #include "extensions/common/features/feature_provider.h" 24 #include "extensions/common/features/feature_provider.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « chrome/common/extensions/chrome_extensions_client.h ('k') | extensions/browser/extension_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698