summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_shelf_model.cc
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-23 05:14:29 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-23 05:14:29 +0000
commitabe7a89488d132d650aff0846ccd9a0b83d4a1f1 (patch)
tree11a4ec9d81858c7ed3c42433b8f1eff3f6ab4d0c /chrome/browser/extensions/extension_shelf_model.cc
parentd022e4e5e269c8a49262003867f7c1354ac00a38 (diff)
downloadchromium_src-abe7a89488d132d650aff0846ccd9a0b83d4a1f1.zip
chromium_src-abe7a89488d132d650aff0846ccd9a0b83d4a1f1.tar.gz
chromium_src-abe7a89488d132d650aff0846ccd9a0b83d4a1f1.tar.bz2
Disable extensions besides externally installed ones and themes.
This is mainly intended to be pulled to the 3.0 branch. It won't be submitted until another corresponding change to undo the damage is ready. BUG=13467 TEST=Added unit tests Review URL: http://codereview.chromium.org/132003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_shelf_model.cc')
-rw-r--r--chrome/browser/extensions/extension_shelf_model.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/extensions/extension_shelf_model.cc b/chrome/browser/extensions/extension_shelf_model.cc
index 70013e5..40b4158 100644
--- a/chrome/browser/extensions/extension_shelf_model.cc
+++ b/chrome/browser/extensions/extension_shelf_model.cc
@@ -124,8 +124,10 @@ void ExtensionShelfModel::Observe(NotificationType type,
RemoveExtension(Details<Extension>(details).ptr());
break;
case NotificationType::EXTENSIONS_READY:
- AddExtensions(browser_->profile()->GetExtensionsService()->extensions());
- SortToolstrips();
+ if (browser_->profile()->GetExtensionsService()) {
+ AddExtensions(browser_->profile()->GetExtensionsService()->extensions());
+ SortToolstrips();
+ }
ready_ = true;
break;
case NotificationType::EXTENSION_SHELF_MODEL_CHANGED: