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

Unified Diff: extensions/common/extension_api.h

Issue 2254383002: Signal extension API schema corruption to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 4 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: extensions/common/extension_api.h
diff --git a/extensions/common/extension_api.h b/extensions/common/extension_api.h
index e876079b37858897adf6611bcfe679e5744fed8a..22b6fc444376579c6fb6966d1b212ca85fadd464 100644
--- a/extensions/common/extension_api.h
+++ b/extensions/common/extension_api.h
@@ -106,10 +106,16 @@ class ExtensionAPI {
// Returns true if |name| is available to WebUI contexts on |url|.
bool IsAvailableToWebUI(const std::string& name, const GURL& url);
- // Gets the schema for the extension API with namespace |full_name|.
+ // Gets the schema for the extension API with namespace |full_name|, or
+ // nullptr if the schema could not be loaded.
// Ownership remains with this object.
const base::DictionaryValue* GetSchema(const std::string& full_name);
+ // Attempts to load the schema for |api|. If the schema cannot be
+ // loaded then the calling process will be killed. If the |api| is not
+ // recognized then the call has no effect.
+ void LoadSchemaListOrDie(const std::string& api);
+
// Splits a full name from the extension API into its API and child name
// parts. Some examples:
//

Powered by Google App Engine
This is Rietveld 408576698