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

Unified Diff: chrome/browser/android/ntp/popular_sites.h

Issue 2031603002: In PopularSites, parse (not sanitize) JSON safely. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/android/ntp/popular_sites.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/ntp/popular_sites.h
diff --git a/chrome/browser/android/ntp/popular_sites.h b/chrome/browser/android/ntp/popular_sites.h
index 40ac5cd67bcebc126a0942419bd4e6006bd47a50..acd1796c0b5f55011aa52ad31f69903a285bd0dc 100644
--- a/chrome/browser/android/ntp/popular_sites.h
+++ b/chrome/browser/android/ntp/popular_sites.h
@@ -17,6 +17,10 @@
#include "net/url_request/url_fetcher_delegate.h"
#include "url/gurl.h"
+namespace base {
+class Value;
+}
+
namespace net {
class URLRequestContextGetter;
}
@@ -130,11 +134,10 @@ class PopularSites : public net::URLFetcherDelegate {
// net::URLFetcherDelegate implementation.
void OnURLFetchComplete(const net::URLFetcher* source) override;
- void OnJsonSanitized(const std::string& valid_minified_json);
- void OnJsonSanitizationFailed(const std::string& error_message);
- void OnFileWriteDone(const std::string& json, bool success);
- void ParseSiteList(const std::string& json);
- void OnJsonParsed(std::unique_ptr<std::vector<Site>> sites);
+ void OnJsonParsed(std::unique_ptr<base::Value> json);
+ void OnJsonParseFailed(const std::string& error_message);
+ void OnFileWriteDone(std::unique_ptr<base::Value> json, bool success);
+ void ParseSiteList(std::unique_ptr<base::Value> json);
void OnDownloadFailed();
FinishedCallback callback_;
« no previous file with comments | « no previous file | chrome/browser/android/ntp/popular_sites.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698