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

Unified Diff: chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc

Issue 11345008: Remove content::NotificationObserver dependency from most Prefs code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge LKGR. Created 8 years, 2 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/ui/views/tabs/browser_tab_strip_controller.cc
diff --git a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 40cba36f61c6beaebef15819d351fc72a80886ff..bb0ec63998f43b8d7c6816b5af7a6c8126000c0f 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -502,20 +502,11 @@ void BrowserTabStripController::OnToolbarBackgroundAnimatorCanceled(
////////////////////////////////////////////////////////////////////////////////
// BrowserTabStripController, content::NotificationObserver implementation:
-void BrowserTabStripController::Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- switch (type) {
- case chrome::NOTIFICATION_PREF_CHANGED:
- if (*content::Details<std::string>(details).ptr() ==
- prefs::kTabStripLayoutType) {
- UpdateLayoutType();
- }
- break;
-
- default:
- NOTREACHED();
- break;
+void BrowserTabStripController::OnPreferenceChanged(
+ PrefServiceBase* service,
+ const std::string& pref_name) {
+ if (pref_name == prefs::kTabStripLayoutType) {
+ UpdateLayoutType();
}
}

Powered by Google App Engine
This is Rietveld 408576698