Move IncognitoSplitMode out of Extension Class
[email protected], [email protected], [email protected], [email protected]
(ben - gypis, chrome_content*client; thestig - c/b/media_galleries/; isherman - c/b/u/cocoa/location_bar/; dbeam - c/b/u/webui/)
BUG=159265
Review URL: https://chromiumcodereview.appspot.com/11882030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@190297 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/extensions/extension_service.cc b/chrome/browser/extensions/extension_service.cc
index 5098729..e6f28b7 100644
--- a/chrome/browser/extensions/extension_service.cc
+++ b/chrome/browser/extensions/extension_service.cc
@@ -85,6 +85,7 @@
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/feature_switch.h"
#include "chrome/common/extensions/features/feature.h"
+#include "chrome/common/extensions/incognito_handler.h"
#include "chrome/common/extensions/manifest.h"
#include "chrome/common/extensions/manifest_url_handler.h"
#include "chrome/common/pref_names.h"
@@ -1638,7 +1639,7 @@
// extensions only see events for a matching profile.
CHECK(extension);
return IsIncognitoEnabled(extension->id()) &&
- !extension->incognito_split_mode();
+ !extensions::IncognitoInfo::IsSplitMode(extension);
}
bool ExtensionService::CanLoadInIncognito(const Extension* extension) const {
@@ -1646,7 +1647,7 @@
return true;
// Packaged apps and regular extensions need to be enabled specifically for
// incognito (and split mode should be set).
- return extension->incognito_split_mode() &&
+ return extensions::IncognitoInfo::IsSplitMode(extension) &&
IsIncognitoEnabled(extension->id());
}