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

Unified Diff: chrome/common/extensions/chrome_extensions_client.cc

Issue 217533006: Introduce apps API target in //apps and move app.runtime API into it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix dependencies (app-runtime-move) 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
« no previous file with comments | « chrome/common/extensions/api/app_runtime.idl ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 5d82845d74af16f0c5fd08aff1b00e4fe0ce71ce..28ab9951e337ffb11fe6ad4f78e9529f4aa2bf2b 100644
--- a/chrome/common/extensions/chrome_extensions_client.cc
+++ b/chrome/common/extensions/chrome_extensions_client.cc
@@ -4,6 +4,7 @@
#include "chrome/common/extensions/chrome_extensions_client.h"
+#include "apps/common/api/generated_schemas.h"
#include "base/command_line.h"
#include "chrome/common/extensions/api/generated_schemas.h"
#include "chrome/common/extensions/chrome_manifest_handlers.h"
@@ -154,15 +155,22 @@ bool ChromeExtensionsClient::IsScriptableURL(
bool ChromeExtensionsClient::IsAPISchemaGenerated(
const std::string& name) const {
+ // Test from most common to least common.
return extensions::api::GeneratedSchemas::IsGenerated(name) ||
- extensions::core_api::GeneratedSchemas::IsGenerated(name);
+ extensions::core_api::GeneratedSchemas::IsGenerated(name) ||
+ apps::api::GeneratedSchemas::IsGenerated(name);
}
base::StringPiece ChromeExtensionsClient::GetAPISchema(
const std::string& name) const {
+ // Test from most common to least common.
if (extensions::api::GeneratedSchemas::IsGenerated(name))
return extensions::api::GeneratedSchemas::Get(name);
- return extensions::core_api::GeneratedSchemas::Get(name);
+
+ if (extensions::core_api::GeneratedSchemas::IsGenerated(name))
+ return extensions::core_api::GeneratedSchemas::Get(name);
+
+ return apps::api::GeneratedSchemas::Get(name);
}
// static
« no previous file with comments | « chrome/common/extensions/api/app_runtime.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698