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

Unified Diff: extensions/renderer/script_context_set.cc

Issue 2892403002: Introduce lock screen app context to extension features (Closed)
Patch Set: . Created 3 years, 7 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/renderer/script_context_set.cc
diff --git a/extensions/renderer/script_context_set.cc b/extensions/renderer/script_context_set.cc
index 8f520e40bf308850d65cb5b2edb6ae386fad22ca..2b0875d9ced095ca2e797faa6dfb7e18212caa1b 100644
--- a/extensions/renderer/script_context_set.cc
+++ b/extensions/renderer/script_context_set.cc
@@ -199,10 +199,13 @@ Feature::Context ScriptContextSet::ClassifyJavaScriptContext(
// case this would usually be considered a (blessed) web page context,
// unless the extension in question is a component extension, in which case
// we cheat and call it blessed.
- return (extension->is_hosted_app() &&
- extension->location() != Manifest::COMPONENT)
- ? Feature::BLESSED_WEB_PAGE_CONTEXT
- : Feature::BLESSED_EXTENSION_CONTEXT;
+ if (extension->is_hosted_app() &&
+ extension->location() != Manifest::COMPONENT) {
+ return Feature::BLESSED_WEB_PAGE_CONTEXT;
+ }
+
+ return is_lock_screen_context_ ? Feature::LOCK_SCREEN_EXTENSION_CONTEXT
Devlin 2017/06/03 02:19:15 similar question to process map
tbarzic 2017/06/05 19:35:40 pretty much the same answer :)
+ : Feature::BLESSED_EXTENSION_CONTEXT;
}
// TODO(kalman): This isUnique() check is wrong, it should be performed as

Powered by Google App Engine
This is Rietveld 408576698