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

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

Issue 1851803002: [NTP Popular Sites] Store country/version in prefs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 4 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
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_service.cc ('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/popular_sites_internals_message_handler.cc
diff --git a/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc b/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc
index 11adb9cafeb41f5488586a015b3f99d1c96b4daa..c5f4bbe10f543764ceeffa25365e3ab179b0f265 100644
--- a/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc
+++ b/chrome/browser/ui/webui/popular_sites_internals_message_handler.cc
@@ -26,7 +26,8 @@ std::string ReadFileToString(const base::FilePath& path) {
result.clear();
return result;
}
-}
+
+} // namespace
PopularSitesInternalsMessageHandler::PopularSitesInternalsMessageHandler()
: weak_ptr_factory_(this) {}
@@ -115,6 +116,8 @@ void PopularSitesInternalsMessageHandler::SendSites() {
base::DictionaryValue result;
result.Set("sites", std::move(sites_list));
+ result.SetString("country", popular_sites_->GetCountry());
+ result.SetString("version", popular_sites_->GetVersion());
web_ui()->CallJavascriptFunction(
"chrome.popular_sites_internals.receiveSites", result);
}
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_service.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698