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

Unified Diff: chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc

Issue 1776393003: MD Settings: avoid double pref observation on Startup Pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: doc comment Created 4 years, 9 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
« no previous file with comments | « chrome/browser/ui/webui/settings/settings_startup_pages_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc
diff --git a/chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc b/chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc
index 233df7c3022041e7d9874885b1c08b363cf80017..ed3a9341b2542943ec7d89dec3e165514308cba3 100644
--- a/chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc
+++ b/chrome/browser/ui/webui/settings/settings_startup_pages_handler.cc
@@ -40,6 +40,11 @@ void StartupPagesHandler::RegisterMessages() {
base::Unretained(this)));
}
+void StartupPagesHandler::RenderViewReused() {
+ startup_custom_pages_table_model_.SetObserver(nullptr);
+ pref_change_registrar_.RemoveAll();
+}
+
void StartupPagesHandler::OnModelChanged() {
base::ListValue startup_pages;
int page_count = startup_custom_pages_table_model_.RowCount();
« no previous file with comments | « chrome/browser/ui/webui/settings/settings_startup_pages_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698