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

Unified Diff: chrome/browser/ui/browser.cc

Issue 807053005: Use BrowserCommandController's logic uniformly for bookmark command enable/disable (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkgr
Patch Set: . Created 6 years 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 | chrome/browser/ui/browser_command_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser.cc
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 446d9f4d8872df78c72e46cf71a03f1d5531eaca..8868b42092c7a2d38a0834b2d06ee5fcd84b02b5 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2014,28 +2014,14 @@ void Browser::OnExtensionUninstalled(content::BrowserContext* browser_context,
void Browser::OnExtensionLoaded(content::BrowserContext* browser_context,
const extensions::Extension* extension) {
- chrome::UpdateCommandEnabled(
- this,
- IDC_BOOKMARK_PAGE,
- !chrome::ShouldRemoveBookmarkThisPageUI(profile_));
- chrome::UpdateCommandEnabled(
- this,
- IDC_BOOKMARK_ALL_TABS,
- !chrome::ShouldRemoveBookmarkOpenPagesUI(profile_));
+ command_controller_->ExtensionStateChanged();
}
void Browser::OnExtensionUnloaded(
content::BrowserContext* browser_context,
const extensions::Extension* extension,
extensions::UnloadedExtensionInfo::Reason reason) {
- chrome::UpdateCommandEnabled(
- this,
- IDC_BOOKMARK_PAGE,
- !chrome::ShouldRemoveBookmarkThisPageUI(profile_));
- chrome::UpdateCommandEnabled(
- this,
- IDC_BOOKMARK_ALL_TABS,
- !chrome::ShouldRemoveBookmarkOpenPagesUI(profile_));
+ command_controller_->ExtensionStateChanged();
if (window()->GetLocationBar())
window()->GetLocationBar()->UpdatePageActions();
« no previous file with comments | « no previous file | chrome/browser/ui/browser_command_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698