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

Unified Diff: content/browser/webui/web_ui_message_handler.cc

Issue 9732027: Fix WebUIMessageHandler unit tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | « no previous file | content/browser/webui/web_ui_message_handler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webui/web_ui_message_handler.cc
===================================================================
--- content/browser/webui/web_ui_message_handler.cc (revision 127566)
+++ content/browser/webui/web_ui_message_handler.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -54,10 +54,12 @@
}
bool WebUIMessageHandler::ExtractDoubleValue(const ListValue* value,
- double* out_value) {
+ double* out_value) {
std::string string_value;
if (value->GetString(0, &string_value))
return base::StringToDouble(string_value, out_value);
+ if (value->GetDouble(0, out_value))
+ return true;
NOTREACHED();
return false;
}
« no previous file with comments | « no previous file | content/browser/webui/web_ui_message_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698