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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/chrome_extensions_client.cc
diff --git a/chrome/common/extensions/chrome_extensions_client.cc b/chrome/common/extensions/chrome_extensions_client.cc
index b76812260e7e9468dac6a029c47b557a59636515..c9b7c19f86e810cdc4e82cc28edfd0c859a3de07 100644
--- a/chrome/common/extensions/chrome_extensions_client.cc
+++ b/chrome/common/extensions/chrome_extensions_client.cc
@@ -5,11 +5,13 @@
#include "chrome/common/extensions/chrome_extensions_client.h"
#include "base/command_line.h"
+#include "chrome/common/extensions/api/generated_schemas.h"
#include "chrome/common/extensions/chrome_manifest_handlers.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/extensions/features/base_feature_provider.h"
#include "chrome/common/url_constants.h"
#include "content/public/common/url_constants.h"
+#include "extensions/common/api/generated_schemas.h"
#include "extensions/common/common_manifest_handlers.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_constants.h"
@@ -154,6 +156,19 @@ bool ChromeExtensionsClient::IsScriptableURL(
return true;
}
+bool ChromeExtensionsClient::IsAPISchemaGenerated(
+ const std::string& name) const {
+ return extensions::api::GeneratedSchemas::IsGenerated(name) ||
+ extensions::core_api::GeneratedSchemas::IsGenerated(name);
+}
+
+base::StringPiece ChromeExtensionsClient::GetAPISchema(
+ const std::string& name) const {
+ if (extensions::api::GeneratedSchemas::IsGenerated(name))
+ return extensions::api::GeneratedSchemas::Get(name);
+ return extensions::core_api::GeneratedSchemas::Get(name);
+}
+
// static
ChromeExtensionsClient* ChromeExtensionsClient::GetInstance() {
return g_client.Pointer();

Powered by Google App Engine
This is Rietveld 408576698