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

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

Issue 183893041: Move sockets APIs out of src/chrome (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/extensions/api/generated_schemas.h"
8 #include "chrome/common/extensions/chrome_manifest_handlers.h" 9 #include "chrome/common/extensions/chrome_manifest_handlers.h"
9 #include "chrome/common/extensions/extension_constants.h" 10 #include "chrome/common/extensions/extension_constants.h"
10 #include "chrome/common/extensions/features/base_feature_provider.h" 11 #include "chrome/common/extensions/features/base_feature_provider.h"
11 #include "chrome/common/url_constants.h" 12 #include "chrome/common/url_constants.h"
12 #include "content/public/common/url_constants.h" 13 #include "content/public/common/url_constants.h"
14 #include "extensions/common/api/generated_schemas.h"
13 #include "extensions/common/common_manifest_handlers.h" 15 #include "extensions/common/common_manifest_handlers.h"
14 #include "extensions/common/extension.h" 16 #include "extensions/common/extension.h"
15 #include "extensions/common/manifest_constants.h" 17 #include "extensions/common/manifest_constants.h"
16 #include "extensions/common/manifest_handler.h" 18 #include "extensions/common/manifest_handler.h"
17 #include "extensions/common/permissions/api_permission_set.h" 19 #include "extensions/common/permissions/api_permission_set.h"
18 #include "extensions/common/permissions/permission_message.h" 20 #include "extensions/common/permissions/permission_message.h"
19 #include "extensions/common/switches.h" 21 #include "extensions/common/switches.h"
20 #include "extensions/common/url_pattern.h" 22 #include "extensions/common/url_pattern.h"
21 #include "extensions/common/url_pattern_set.h" 23 #include "extensions/common/url_pattern_set.h"
22 #include "grit/generated_resources.h" 24 #include "grit/generated_resources.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return true; 149 return true;
148 } 150 }
149 if (url.host() == store_url.host()) { 151 if (url.host() == store_url.host()) {
150 if (error) 152 if (error)
151 *error = manifest_errors::kCannotScriptGallery; 153 *error = manifest_errors::kCannotScriptGallery;
152 return false; 154 return false;
153 } 155 }
154 return true; 156 return true;
155 } 157 }
156 158
159 bool ChromeExtensionsClient::IsAPISchemaGenerated(
160 const std::string& name) const {
161 return extensions::api::GeneratedSchemas::IsGenerated(name) ||
162 extensions::core_api::GeneratedSchemas::IsGenerated(name);
163 }
164
165 base::StringPiece ChromeExtensionsClient::GetAPISchema(
166 const std::string& name) const {
167 if (extensions::api::GeneratedSchemas::IsGenerated(name))
168 return extensions::api::GeneratedSchemas::Get(name);
169 return extensions::core_api::GeneratedSchemas::Get(name);
170 }
171
157 // static 172 // static
158 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() { 173 ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() {
159 return g_client.Pointer(); 174 return g_client.Pointer();
160 } 175 }
161 176
162 } // namespace extensions 177 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698