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

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

Issue 11348165: Remove PrefObserver usages, batch 10. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 2bdebb0c996c202b4c69a5de867df2cf22134a30..7eef1f872375fbdaa5b76da3c53ee7c00a60f5dd 100644
--- a/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ b/chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -177,7 +177,10 @@ BrowserTabStripController::BrowserTabStripController(Browser* browser,
model_->AddObserver(this);
local_pref_registrar_.Init(g_browser_process->local_state());
- local_pref_registrar_.Add(prefs::kTabStripLayoutType, this);
+ local_pref_registrar_.Add(
+ prefs::kTabStripLayoutType,
+ base::Bind(&BrowserTabStripController::UpdateLayoutType,
+ base::Unretained(this)));
}
BrowserTabStripController::~BrowserTabStripController() {
@@ -432,17 +435,6 @@ void BrowserTabStripController::TabBlockedStateChanged(WebContents* contents,
SetTabDataAt(contents, model_index);
}
-////////////////////////////////////////////////////////////////////////////////
-// BrowserTabStripController, content::NotificationObserver implementation:
-
-void BrowserTabStripController::OnPreferenceChanged(
- PrefServiceBase* service,
- const std::string& pref_name) {
- if (pref_name == prefs::kTabStripLayoutType) {
- UpdateLayoutType();
- }
-}
-
void BrowserTabStripController::SetTabRendererDataFromModel(
WebContents* contents,
int model_index,

Powered by Google App Engine
This is Rietveld 408576698