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

Unified Diff: chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc

Issue 9994005: Separate handler initialization from page initialization (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move anything that indirectly calls JS to InitializePage Created 8 years, 8 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/webui/options2/search_engine_manager_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc b/chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc
index f62eeb220fc459d43198f02275ccb6299dfc79a6..03aa4be7a7be57ce95b61750c9f3723bff8392d9 100644
--- a/chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc
+++ b/chrome/browser/ui/webui/options2/search_engine_manager_handler2.cc
@@ -44,11 +44,10 @@ SearchEngineManagerHandler::~SearchEngineManagerHandler() {
void SearchEngineManagerHandler::InitializeHandler() {
list_controller_.reset(
new KeywordEditorController(Profile::FromWebUI(web_ui())));
- DCHECK(list_controller_.get());
- list_controller_->table_model()->SetObserver(this);
}
void SearchEngineManagerHandler::InitializePage() {
+ list_controller_->table_model()->SetObserver(this);
OnModelChanged();
}
@@ -247,10 +246,6 @@ void SearchEngineManagerHandler::EditSearchEngine(const ListValue* args) {
return;
}
- // CHECK()s to track down the cause of crbug.com/121741.
- CHECK(list_controller_.get());
- CHECK(list_controller_->table_model());
-
// Allow -1, which means we are adding a new engine.
if (index < -1 || index >= list_controller_->table_model()->RowCount())
return;

Powered by Google App Engine
This is Rietveld 408576698