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

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.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/ui/webui/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index 7ce131fefee470d60149faea6da373a9b5f01de2..78ea499fb4fcacd87d08233fcf4968b1a2ba50d2 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -95,7 +95,7 @@ bool GetAuthData(const std::string& json,
std::string* password,
std::string* captcha,
std::string* access_code) {
- scoped_ptr<Value> parsed_value(base::JSONReader::Read(json, false));
+ scoped_ptr<Value> parsed_value(base::JSONReader::Read(json));
if (!parsed_value.get() || !parsed_value->IsType(Value::TYPE_DICTIONARY))
return false;
@@ -110,7 +110,7 @@ bool GetAuthData(const std::string& json,
}
bool GetConfiguration(const std::string& json, SyncConfigInfo* config) {
- scoped_ptr<Value> parsed_value(base::JSONReader::Read(json, false));
+ scoped_ptr<Value> parsed_value(base::JSONReader::Read(json));
DictionaryValue* result;
if (!parsed_value.get() || !parsed_value->GetAsDictionary(&result)) {
DLOG(ERROR) << "GetConfiguration() not passed a Dictionary";
@@ -161,7 +161,7 @@ bool GetConfiguration(const std::string& json, SyncConfigInfo* config) {
}
bool GetPassphrase(const std::string& json, std::string* passphrase) {
- scoped_ptr<Value> parsed_value(base::JSONReader::Read(json, false));
+ scoped_ptr<Value> parsed_value(base::JSONReader::Read(json));
if (!parsed_value.get() || !parsed_value->IsType(Value::TYPE_DICTIONARY))
return false;
@@ -720,7 +720,7 @@ void SyncSetupHandler::HandleAttachHandler(const ListValue* args) {
bool force_login = false;
std::string json;
if (args->GetString(0, &json) && !json.empty()) {
- scoped_ptr<Value> parsed_value(base::JSONReader::Read(json, false));
+ scoped_ptr<Value> parsed_value(base::JSONReader::Read(json));
DictionaryValue* result = static_cast<DictionaryValue*>(parsed_value.get());
result->GetBoolean("forceLogin", &force_login);
}

Powered by Google App Engine
This is Rietveld 408576698