summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_shelf_model.cc
diff options
context:
space:
mode:
authormpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 00:05:34 +0000
committermpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-11 00:05:34 +0000
commit1bd5413c93779467e15c402e5bb1c866792bcac6 (patch)
tree19615d0f974d67abadd8464d188c5a8a02b84fe0 /chrome/browser/extensions/extension_shelf_model.cc
parentd9fac60990a817c7ef7f1a7beef90dc319bf299b (diff)
downloadchromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.zip
chromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.tar.gz
chromium_src-1bd5413c93779467e15c402e5bb1c866792bcac6.tar.bz2
Disable extensions in incognito mode.
Add a browsertest to make sure we don't crash with an incognito window open. Had to finagle utility_process_host to make it work in a browsertest. BUG=12326 TEST=none Review URL: http://codereview.chromium.org/118476 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18116 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_shelf_model.cc')
-rw-r--r--chrome/browser/extensions/extension_shelf_model.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/extensions/extension_shelf_model.cc b/chrome/browser/extensions/extension_shelf_model.cc
index 37d3eb6..6af45c6 100644
--- a/chrome/browser/extensions/extension_shelf_model.cc
+++ b/chrome/browser/extensions/extension_shelf_model.cc
@@ -107,6 +107,9 @@ void ExtensionShelfModel::Observe(NotificationType type,
void ExtensionShelfModel::AddExtensions(const ExtensionList* extensions) {
ExtensionProcessManager* manager =
browser_->profile()->GetExtensionProcessManager();
+ if (!manager)
+ return;
+
for (ExtensionList::const_iterator extension = extensions->begin();
extension != extensions->end(); ++extension) {
for (std::vector<std::string>::const_iterator toolstrip_path =