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

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
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..f896cde162cabc3605cbea08cc0650a62af75885 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_->country());
+ result.SetString("version", popular_sites_->version());
web_ui()->CallJavascriptFunction(
"chrome.popular_sites_internals.receiveSites", result);
}

Powered by Google App Engine
This is Rietveld 408576698