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

Unified Diff: remoting/host/plugin/host_script_object.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
« base/json/json_reader.h ('K') | « remoting/host/plugin/daemon_controller_win.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/plugin/host_script_object.cc
diff --git a/remoting/host/plugin/host_script_object.cc b/remoting/host/plugin/host_script_object.cc
index f7f64c8a1d613734c782fb6fa056860b62d9e3df..5743a96c9fde4ce204fb9846061719f7f7b6db7e 100644
--- a/remoting/host/plugin/host_script_object.cc
+++ b/remoting/host/plugin/host_script_object.cc
@@ -678,7 +678,8 @@ bool HostNPScriptObject::UpdateDaemonConfig(const NPVariant* args,
}
std::string config_str = StringFromNPVariant(args[0]);
- scoped_ptr<base::Value> config(base::JSONReader::Read(config_str, true));
+ scoped_ptr<base::Value> config(
+ base::JSONReader::Read(config_str, base::JSON_ALLOW_TRAILING_COMMAS));
if (config_str.empty() || !config.get() ||
!config->IsType(base::Value::TYPE_DICTIONARY)) {
SetException("updateDaemonConfig: bad config parameter");
@@ -739,7 +740,8 @@ bool HostNPScriptObject::StartDaemon(const NPVariant* args,
}
std::string config_str = StringFromNPVariant(args[0]);
- scoped_ptr<base::Value> config(base::JSONReader::Read(config_str, true));
+ scoped_ptr<base::Value> config(
+ base::JSONReader::Read(config_str, base::JSON_ALLOW_TRAILING_COMMAS));
if (config_str.empty() || !config.get() ||
!config->IsType(base::Value::TYPE_DICTIONARY)) {
SetException("updateDaemonConfig: bad config parameter");
« base/json/json_reader.h ('K') | « remoting/host/plugin/daemon_controller_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698