Index: chrome/browser/ui/views/location_bar/location_bar_view.cc |
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
index e78066e97c9948bb71e08b88e61dfc6f9cff8144..e57c0a1c1e9eedbb352666c8ebe15bbc48194b39 100644 |
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc |
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc |
@@ -1585,13 +1585,6 @@ void LocationBarView::Observe(int type, |
const content::NotificationSource& source, |
const content::NotificationDetails& details) { |
switch (type) { |
- case chrome::NOTIFICATION_PREF_CHANGED: { |
- std::string* name = content::Details<std::string>(details).ptr(); |
- if (*name == prefs::kEditBookmarksEnabled) |
- Update(NULL); |
- break; |
- } |
- |
case chrome::NOTIFICATION_EXTENSION_LOCATION_BAR_UPDATED: { |
// Only update if the updated action box was for the active tab contents. |
WebContents* target_tab = content::Details<WebContents>(details).ptr(); |
@@ -1605,6 +1598,12 @@ void LocationBarView::Observe(int type, |
} |
} |
+void LocationBarView::OnPreferenceChanged(PrefServiceBase* service, |
+ const std::string& pref_name) { |
+ if (pref_name == prefs::kEditBookmarksEnabled) |
+ Update(NULL); |
+} |
+ |
int LocationBarView::GetInternalHeight(bool use_preferred_size) { |
int total_height = |
use_preferred_size ? GetPreferredSize().height() : height(); |