diff options
Diffstat (limited to 'chrome/browser/dom_ui/tips_handler.cc')
-rw-r--r-- | chrome/browser/dom_ui/tips_handler.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/dom_ui/tips_handler.cc b/chrome/browser/dom_ui/tips_handler.cc index 3d26945..f935abd 100644 --- a/chrome/browser/dom_ui/tips_handler.cc +++ b/chrome/browser/dom_ui/tips_handler.cc @@ -21,14 +21,15 @@ namespace { L"Tips and recommendations to help you discover interesting websites."; } -TipsHandler::TipsHandler(DOMUI* dom_ui) - : DOMMessageHandler(dom_ui), - dom_ui_(dom_ui) { - dom_ui->RegisterMessageCallback("getTips", - NewCallback(this, &TipsHandler::HandleGetTips)); - +DOMMessageHandler* TipsHandler::Attach(DOMUI* dom_ui) { tips_cache_ = dom_ui_->GetProfile()->GetPrefs()-> GetDictionary(prefs::kNTPTipsCache); + return DOMMessageHandler::Attach(dom_ui); +} + +void TipsHandler::RegisterMessages() { + dom_ui_->RegisterMessageCallback("getTips", + NewCallback(this, &TipsHandler::HandleGetTips)); } void TipsHandler::HandleGetTips(const Value* content) { |