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

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

Issue 1351223003: Allow extensions to specify that they are not allowed in incognito mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add expectations for IncognitoInfo to test Created 5 years, 3 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: chrome/browser/extensions/extension_util.cc
diff --git a/chrome/browser/extensions/extension_util.cc b/chrome/browser/extensions/extension_util.cc
index a4b12f361f9bdf234083028f1237e18eee759c1d..97a017705b97de33b240839730f4cb63501bae16 100644
--- a/chrome/browser/extensions/extension_util.cc
+++ b/chrome/browser/extensions/extension_util.cc
@@ -119,7 +119,7 @@ bool IsIncognitoEnabled(const std::string& extension_id,
const Extension* extension = ExtensionRegistry::Get(context)->
GetExtensionById(extension_id, ExtensionRegistry::ENABLED);
if (extension) {
- if (!extension->can_be_incognito_enabled())
+ if (!util::CanBeIncognitoEnabled(extension))
return false;
// If this is an existing component extension we always allow it to
// work in incognito mode.
@@ -139,7 +139,7 @@ void SetIsIncognitoEnabled(const std::string& extension_id,
registry->GetExtensionById(extension_id, ExtensionRegistry::EVERYTHING);
if (extension) {
- if (!extension->can_be_incognito_enabled())
+ if (!util::CanBeIncognitoEnabled(extension))
return;
// TODO(treib,kalman): Should this be Manifest::IsComponentLocation(..)?
« no previous file with comments | « chrome/browser/extensions/api/messaging/message_service.cc ('k') | chrome/browser/extensions/installed_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698