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

Unified Diff: chrome/browser/extensions/extensions_service.cc

Issue 4234004: Fix some UI issues with omnibox extensions in incognito. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 10 years, 1 month 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: chrome/browser/extensions/extensions_service.cc
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 98681de771ffa917dfc48d22c9a3c741b271ff2a..734bdef237ba728efe09662fc882f2f8dd90db3f 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -1336,6 +1336,13 @@ void ExtensionsService::SetIsIncognitoEnabled(const Extension* extension,
}
}
+bool ExtensionsService::CanCrossIncognito(const Extension* extension) {
+ // We allow the extension to see events and data from another profile iff it
+ // uses "spanning" behavior and it has incognito access. "split" mode
+ // extensions only see events for a matching profile.
+ return IsIncognitoEnabled(extension) && !extension->incognito_split_mode();
+}
+
bool ExtensionsService::AllowFileAccess(const Extension* extension) {
return (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kDisableExtensionsFileAccessCheck) ||
« no previous file with comments | « chrome/browser/extensions/extensions_service.h ('k') | chrome/browser/tab_contents/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698