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

Unified Diff: chrome/browser/ui/webui/md_history_ui.cc

Issue 2361513003: MD History: Update sign in state in data source (Closed)
Patch Set: try another approach Created 4 years, 3 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/md_history_ui.cc
diff --git a/chrome/browser/ui/webui/md_history_ui.cc b/chrome/browser/ui/webui/md_history_ui.cc
index bd1e358b0c308f38f7f7728bcfaadb622e5e4db9..27ec8027197b85d60d677722087a103322405b2f 100644
--- a/chrome/browser/ui/webui/md_history_ui.cc
+++ b/chrome/browser/ui/webui/md_history_ui.cc
@@ -218,14 +218,14 @@ MdHistoryUI::MdHistoryUI(content::WebUI* web_ui) : WebUIController(web_ui) {
web_ui->AddMessageHandler(new BrowsingHistoryHandler());
web_ui->AddMessageHandler(new MetricsHandler());
+ data_source_ = CreateMdHistoryUIHTMLSource(profile, use_test_title_);
+ content::WebUIDataSource::Add(profile, data_source_);
+
if (search::IsInstantExtendedAPIEnabled()) {
web_ui->AddMessageHandler(new browser_sync::ForeignSessionHandler());
- web_ui->AddMessageHandler(new HistoryLoginHandler());
+ web_ui->AddMessageHandler(new HistoryLoginHandler(data_source_));
}
- data_source_ = CreateMdHistoryUIHTMLSource(profile, use_test_title_);
- content::WebUIDataSource::Add(profile, data_source_);
-
web_ui->RegisterMessageCallback("menuPromoShown",
base::Bind(&MdHistoryUI::HandleMenuPromoShown, base::Unretained(this)));
}
« chrome/browser/ui/webui/history_login_handler.cc ('K') | « chrome/browser/ui/webui/history_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698