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

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

Issue 8333021: Fix a crash in PageActionImageView when extensions are reloaded due to incognito settings changing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_service.cc
===================================================================
--- chrome/browser/extensions/extension_service.cc (revision 106057)
+++ chrome/browser/extensions/extension_service.cc (working copy)
@@ -1726,7 +1726,7 @@
namespace {
bool IsSyncableNone(const Extension& extension) { return false; }
-} // namespace
+} // namespace
ExtensionService::SyncBundle::SyncBundle()
: filter(IsSyncableNone),
@@ -2028,8 +2028,13 @@
// reload it to update UI.
const Extension* enabled_extension = GetExtensionById(extension_id, false);
if (enabled_extension) {
+ ExtensionList::iterator iter = std::find(extensions_.begin(),
Aaron Boodman 2011/10/20 15:21:49 Can we just call ReloadExtension() instead? That i
Matt Perry 2011/10/24 18:48:56 Honestly, I don't know. I didn't realize the two u
+ extensions_.end(),
+ enabled_extension);
+ extensions_.erase(iter);
NotifyExtensionUnloaded(
enabled_extension, extension_misc::UNLOAD_REASON_DISABLE);
+ extensions_.push_back(make_scoped_refptr(enabled_extension));
NotifyExtensionLoaded(enabled_extension);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698