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

Unified Diff: extensions/browser/process_map.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/browser/process_map.cc
diff --git a/extensions/browser/process_map.cc b/extensions/browser/process_map.cc
index b3100201d011331d40fc8839a82b28b61fc92a24..5fc1284a33f712a9e1be824b1767c2b178fb6b5a 100644
--- a/extensions/browser/process_map.cc
+++ b/extensions/browser/process_map.cc
@@ -116,8 +116,8 @@ std::set<std::string> ProcessMap::GetExtensionsInProcess(int process_id) const {
Feature::Context ProcessMap::GetMostLikelyContextType(
const Extension* extension,
int process_id) const {
- // WARNING: This logic must match Dispatcher::ClassifyJavaScriptContext, as
- // much as possible.
+ // WARNING: This logic must match ScriptContextSet::ClassifyJavaScriptContext,
+ // as much as possible.
if (content::ChildProcessSecurityPolicy::GetInstance()->HasWebUIBindings(
process_id)) {
@@ -140,6 +140,9 @@ Feature::Context ProcessMap::GetMostLikelyContextType(
return Feature::BLESSED_WEB_PAGE_CONTEXT;
}
+ if (extension->runs_on_lock_screen())
+ return Feature::LOCK_SCREEN_EXTENSION_CONTEXT;
+
return Feature::BLESSED_EXTENSION_CONTEXT;
}

Powered by Google App Engine
This is Rietveld 408576698