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

Unified Diff: chrome/test/automation/automation_json_requests.cc

Issue 7753020: Revert recent changes to base::Value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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/test/automation/automation_json_requests.cc
diff --git a/chrome/test/automation/automation_json_requests.cc b/chrome/test/automation/automation_json_requests.cc
index ecd932ef76f62ac4f4d6c774ebcbbc35c115dbd8..ab0de317a05c72335a198dd4119fb645c6b642bc 100644
--- a/chrome/test/automation/automation_json_requests.cc
+++ b/chrome/test/automation/automation_json_requests.cc
@@ -187,11 +187,11 @@ bool SendExecuteJavascriptJSONRequest(
JSONStringValueSerializer deserializer(json);
Value* value = deserializer.Deserialize(NULL, NULL);
- if (!value || !value->AsList()) {
+ if (!value || !value->IsType(Value::TYPE_LIST)) {
LOG(ERROR) << "Unable to deserialize returned JSON";
return false;
}
- scoped_ptr<ListValue> list(value->AsList());
+ scoped_ptr<ListValue> list(static_cast<ListValue*>(value));
return list->Remove(0, result);
}
@@ -297,9 +297,9 @@ bool SendGetCookiesJSONRequest(
if (!reply_dict.Remove("cookies", &cookies_unscoped_value))
return false;
scoped_ptr<Value> cookies_value(cookies_unscoped_value);
- if (!cookies_value->AsList())
+ if (!cookies_value->IsType(Value::TYPE_LIST))
return false;
- *cookies = cookies_value->AsList();
+ *cookies = static_cast<ListValue*>(cookies_value.release());
return true;
}
« no previous file with comments | « chrome/renderer/extensions/extension_process_bindings.cc ('k') | chrome/test/automation/javascript_execution_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698