| Index: chrome/browser/extensions/extension_toolbar_model.cc
|
| diff --git a/chrome/browser/extensions/extension_toolbar_model.cc b/chrome/browser/extensions/extension_toolbar_model.cc
|
| index b75104d38df5d78c6d9eae6ce9b1ef74696a9e3f..4e1a472ff29b9f1c8d99e2c210ebd31e095fb78b 100644
|
| --- a/chrome/browser/extensions/extension_toolbar_model.cc
|
| +++ b/chrome/browser/extensions/extension_toolbar_model.cc
|
| @@ -158,41 +158,28 @@ ExtensionToolbarModel::Action ExtensionToolbarModel::ExecuteBrowserAction(
|
| }
|
|
|
| void ExtensionToolbarModel::SetVisibleIconCount(int count) {
|
| - VLOG(4) << "visible_icon_count_ before: " << visible_icon_count_;
|
| visible_icon_count_ =
|
| count == static_cast<int>(toolbar_items_.size()) ? -1 : count;
|
| - VLOG(4) << "SetVisibleIconCount "
|
| - << count << " == " << toolbar_items_.size() << " -> "
|
| - << visible_icon_count_ << " "
|
| - << "is_highlighting: " << is_highlighting_;
|
| // Only set the prefs if we're not in highlight mode. Highlight mode is
|
| // designed to be a transitory state, and should not persist across browser
|
| // restarts (though it may be re-entered).
|
| - if (!is_highlighting_) {
|
| + if (!is_highlighting_)
|
| prefs_->SetInteger(pref_names::kToolbarSize, visible_icon_count_);
|
| - }
|
| }
|
|
|
| void ExtensionToolbarModel::OnExtensionLoaded(
|
| content::BrowserContext* browser_context,
|
| const Extension* extension) {
|
| - VLOG(4) << "Loading extension";
|
| -
|
| // We don't want to add the same extension twice. It may have already been
|
| // added by EXTENSION_BROWSER_ACTION_VISIBILITY_CHANGED below, if the user
|
| // hides the browser action and then disables and enables the extension.
|
| for (size_t i = 0; i < toolbar_items_.size(); i++) {
|
| - if (toolbar_items_[i].get() == extension) {
|
| - VLOG(4) << "... but returning early";
|
| + if (toolbar_items_[i].get() == extension)
|
| return;
|
| - }
|
| }
|
| if (ExtensionActionAPI::GetBrowserActionVisibility(extension_prefs_,
|
| extension->id())) {
|
| - VLOG(4) << "Adding extensions";
|
| AddExtension(extension);
|
| - } else {
|
| - VLOG(4) << "NOT visible";
|
| }
|
| }
|
|
|
| @@ -229,17 +216,13 @@ void ExtensionToolbarModel::Observe(
|
| *content::Details<const std::string>(details).ptr(),
|
| ExtensionRegistry::EVERYTHING);
|
| if (ExtensionActionAPI::GetBrowserActionVisibility(extension_prefs_,
|
| - extension->id())) {
|
| - VLOG(4) << "Adding extension";
|
| + extension->id()))
|
| AddExtension(extension);
|
| - } else {
|
| - VLOG(4) << "Removing extension";
|
| + else
|
| RemoveExtension(extension);
|
| - }
|
| }
|
|
|
| void ExtensionToolbarModel::OnReady() {
|
| - VLOG(4) << "OnReady called";
|
| ExtensionRegistry* registry = ExtensionRegistry::Get(profile_);
|
| InitializeExtensionList(registry->enabled_extensions());
|
| // Wait until the extension system is ready before observing any further
|
| @@ -353,7 +336,6 @@ void ExtensionToolbarModel::InitializeExtensionList(
|
| last_known_positions_ = extension_prefs_->GetToolbarOrder();
|
| Populate(last_known_positions_, extensions);
|
|
|
| - VLOG(4) << "extensions_initialized!";
|
| extensions_initialized_ = true;
|
| FOR_EACH_OBSERVER(Observer, observers_, VisibleCountChanged());
|
| }
|
|
|