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

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

Issue 1363943002: Revert of [Extensions Toolbar] Add a finch config for the redesign (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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
Index: chrome/browser/extensions/location_bar_controller.cc
diff --git a/chrome/browser/extensions/location_bar_controller.cc b/chrome/browser/extensions/location_bar_controller.cc
index 89af53a53f7a6d39e2987b33b5e69d7cfe9995d6..f32d633697e39672cbea55f969f1fd45babb047f 100644
--- a/chrome/browser/extensions/location_bar_controller.cc
+++ b/chrome/browser/extensions/location_bar_controller.cc
@@ -30,7 +30,8 @@
should_show_page_actions_(
!FeatureSwitch::extension_action_redesign()->IsEnabled()),
extension_registry_observer_(this) {
- extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
+ if (should_show_page_actions_)
+ extension_registry_observer_.Add(ExtensionRegistry::Get(browser_context_));
}
LocationBarController::~LocationBarController() {
@@ -92,7 +93,7 @@
void LocationBarController::OnExtensionLoaded(
content::BrowserContext* browser_context,
const Extension* extension) {
- if (should_show_page_actions_ && action_manager_->GetPageAction(*extension)) {
+ if (action_manager_->GetPageAction(*extension)) {
ExtensionActionAPI::Get(browser_context)->
NotifyPageActionsChanged(web_contents_);
}
@@ -121,7 +122,7 @@
content::BrowserContext* browser_context,
const Extension* extension,
UnloadedExtensionInfo::Reason reason) {
- if (should_show_page_actions_ && action_manager_->GetPageAction(*extension)) {
+ if (action_manager_->GetPageAction(*extension)) {
ExtensionActionAPI::Get(browser_context)->
NotifyPageActionsChanged(web_contents_);
}

Powered by Google App Engine
This is Rietveld 408576698