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

Unified Diff: chrome/browser/android/ntp/most_visited_sites_bridge.cc

Issue 2192783002: Parse PopularSites JSON by callback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@json
Patch Set: Created 4 years, 5 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 | « no previous file | chrome/browser/ui/webui/popular_sites_internals_message_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/most_visited_sites_bridge.cc
diff --git a/chrome/browser/android/ntp/most_visited_sites_bridge.cc b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
index 75d03ff9410f3531e2682d06eac232d589cc41f2..d8bfe17b061fb8342c3fe8e27b3f613e1c01b02e 100644
--- a/chrome/browser/android/ntp/most_visited_sites_bridge.cc
+++ b/chrome/browser/android/ntp/most_visited_sites_bridge.cc
@@ -25,6 +25,7 @@
#include "chrome/browser/thumbnails/thumbnail_list_source.h"
#include "components/history/core/browser/top_sites.h"
#include "components/ntp_tiles/popular_sites.h"
+#include "components/safe_json/safe_json_parser.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/url_data_source.h"
#include "jni/MostVisitedSites_jni.h"
@@ -162,7 +163,8 @@ MostVisitedSitesBridge::MostVisitedSitesBridge(Profile* profile)
TemplateURLServiceFactory::GetForProfile(profile),
g_browser_process->variations_service(),
profile->GetRequestContext(),
- ChromePopularSites::GetDirectory()),
+ ChromePopularSites::GetDirectory(),
+ base::Bind(safe_json::SafeJsonParser::Parse)),
most_visited_(BrowserThread::GetBlockingPool(),
profile->GetPrefs(),
TopSitesFactory::GetForProfile(profile),
« no previous file with comments | « no previous file | chrome/browser/ui/webui/popular_sites_internals_message_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698