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

Unified Diff: chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc

Issue 396493004: Get rid of some uses of CreateDoubleValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: right number of args + fix lint error Created 6 years, 5 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/performance_monitor/performance_monitor_handler.cc
diff --git a/chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc b/chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc
index 59eae7d2d79241f01bb910c8fe874eade7beff4d..e43d41c04ba4ac8e5253ad483a7fe8433b5f2dc2 100644
--- a/chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc
+++ b/chrome/browser/ui/webui/performance_monitor/performance_monitor_handler.cc
@@ -275,9 +275,9 @@ void DoGetEvents(base::ListValue* results,
// The property 'eventType' is set in HandleGetEvents as part of the
// entire result set, so we don't need to include this here in the
// event.
- if (data.key() == "eventType")
+ if (data.key() == "eventType") {
continue;
- else if (data.key() == "time") {
+ } else if (data.key() == "time") {
// The property 'time' is also used computationally, but must be
// converted to JS-style time.
double time = 0.0;
@@ -285,9 +285,9 @@ void DoGetEvents(base::ListValue* results,
LOG(ERROR) << "Failed to get 'time' field from event.";
continue;
}
- value = base::Value::CreateDoubleValue(
- base::Time::FromInternalValue(
- static_cast<int64>(time)).ToJsTime());
+ value = new base::FundamentalValue(
+ base::Time::FromInternalValue(static_cast<int64>(time))
+ .ToJsTime());
} else {
// All other values are user-facing, so we create a new value for
// localized display.
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/ui/webui/quota_internals/quota_internals_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698