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

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 2475583002: Adds option for JSON reader to allow invalid utf characters (Closed)
Patch Set: comment Created 4 years, 1 month 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 | « base/json/json_value_serializer_unittest.cc ('k') | chromeos/network/onc/onc_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/app_list/start_page_service.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index 5610c5622e37c6d2b509a9ba1116b1f7c966c945..c0318f41b3531ec9b645d7201de738139dc5a9b1 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -10,6 +10,7 @@
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/json/json_reader.h"
#include "base/json/json_string_value_serializer.h"
#include "base/macros.h"
#include "base/memory/singleton.h"
@@ -656,8 +657,8 @@ void StartPageService::OnURLFetchComplete(const net::URLFetcher* source) {
if (json_start_index != std::string::npos)
json_data_substr.remove_prefix(json_start_index);
- JSONStringValueDeserializer deserializer(json_data_substr);
- deserializer.set_allow_trailing_comma(true);
+ JSONStringValueDeserializer deserializer(json_data_substr,
+ base::JSON_ALLOW_TRAILING_COMMAS);
int error_code = 0;
std::unique_ptr<base::Value> doodle_json =
deserializer.Deserialize(&error_code, nullptr);
« no previous file with comments | « base/json/json_value_serializer_unittest.cc ('k') | chromeos/network/onc/onc_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698