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

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

Issue 5168004: Revert 66646 - Add "open as window" menu item to NTP app menu.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month 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_toolbar_model.cc
===================================================================
--- chrome/browser/extensions/extension_toolbar_model.cc (revision 66663)
+++ chrome/browser/extensions/extension_toolbar_model.cc (working copy)
@@ -90,6 +90,9 @@
return;
}
+ if (!service_->is_ready())
+ return;
+
const Extension* extension = Details<const Extension>(details).ptr();
if (type == NotificationType::EXTENSION_LOADED) {
AddExtension(extension);
@@ -148,6 +151,8 @@
// 2. Create a vector of extensions that did not have a pref value.
// 3. Remove holes from the sorted vector and append the unsorted vector.
void ExtensionToolbarModel::InitializeExtensionList() {
+ DCHECK(service_->is_ready());
+
std::vector<std::string> pref_order = service_->extension_prefs()->
GetToolbarOrder();
// Items that have a pref for their position.
« no previous file with comments | « chrome/browser/extensions/extension_startup_browsertest.cc ('k') | chrome/browser/extensions/extensions_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698