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

Unified Diff: extensions/common/extension_api.h

Issue 2241203003: Pass user session type to extension feature checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: split out some stuff 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 b8dee559e4b137d5f5d9bce923ae2eb072e0cfea..d66a4da6c6743c697869435985e099f9fca7395d 100644
--- a/extensions/common/extension_api.h
+++ b/extensions/common/extension_api.h
@@ -95,6 +95,7 @@ class ExtensionAPI {
Feature::Availability IsAvailable(const std::string& api_full_name,
const Extension* extension,
Feature::Context context,
+ Feature::SessionType session_type,
Devlin 2016/08/17 17:07:35 The session type can't really change, right? Why
tbarzic 2016/08/17 19:49:01 It can change from UNSPECIFIED when a user logs in
const GURL& url);
// Determines whether an API, or any parts of that API, are available in
@@ -102,10 +103,13 @@ class ExtensionAPI {
bool IsAnyFeatureAvailableToContext(const Feature& api,
const Extension* extension,
Feature::Context context,
+ Feature::SessionType session_type,
const GURL& url);
// Returns true if |name| is available to WebUI contexts on |url|.
- bool IsAvailableToWebUI(const std::string& name, const GURL& url);
+ bool IsAvailableToWebUI(const std::string& name,
+ Feature::SessionType session_type,
+ const GURL& url);
// Gets the schema for the extension API with namespace |full_name|.
// Ownership remains with this object.

Powered by Google App Engine
This is Rietveld 408576698