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

Unified Diff: content/browser/speech/speech_recognition_request.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
« no previous file with comments | « chrome/test/webdriver/webdriver_session.cc ('k') | content/renderer/web_ui_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/speech_recognition_request.cc
diff --git a/content/browser/speech/speech_recognition_request.cc b/content/browser/speech/speech_recognition_request.cc
index 4cc8e19feadb07ad1c751619113606c48a5b8664..645e75de161ef313cda02199ec230c35af1d0577 100644
--- a/content/browser/speech/speech_recognition_request.cc
+++ b/content/browser/speech/speech_recognition_request.cc
@@ -60,12 +60,12 @@ bool ParseServerResponse(const std::string& response_body,
return false;
}
DCHECK(hypotheses_value);
- const ListValue* hypotheses_list = hypotheses_value->AsList();
- if (!hypotheses_list) {
+ if (!hypotheses_value->IsType(Value::TYPE_LIST)) {
VLOG(1) << "ParseServerResponse: Unexpected hypotheses type "
<< hypotheses_value->GetType();
return false;
}
+ const ListValue* hypotheses_list = static_cast<ListValue*>(hypotheses_value);
size_t index = 0;
for (; index < hypotheses_list->GetSize(); ++index) {
« no previous file with comments | « chrome/test/webdriver/webdriver_session.cc ('k') | content/renderer/web_ui_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698