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

Unified Diff: chrome/browser/translate/translate_manager.cc

Issue 9960077: Modify the base::JSONReader interface to take a set of options rather than a boolean flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 8 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/translate/translate_manager.cc
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index 4158484bc03108d3689efd95b207fd7fc810637f..f5076f076f5d1b7536aaeaa2d8901733ffd94daa 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -220,7 +220,8 @@ void TranslateManager::SetSupportedLanguages(const std::string& language_list) {
// JSON doesn't support single quotes though this is what is used on the
// translate server so we must replace them with double quotes.
ReplaceSubstringsAfterOffset(&languages_json, 0, "'", "\"");
- scoped_ptr<Value> json_value(base::JSONReader::Read(languages_json, true));
+ scoped_ptr<Value> json_value(
+ base::JSONReader::Read(languages_json, base::JSON_ALLOW_TRAILING_COMMAS));
if (json_value == NULL || !json_value->IsType(Value::TYPE_DICTIONARY)) {
NOTREACHED();
return;

Powered by Google App Engine
This is Rietveld 408576698