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

Side by Side Diff: chrome/renderer/benchmarking_extension.cc

Issue 864943002: Replaces instances of the deprecated TimeTicks::HighResNow() with TimeTicks::Now(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More changes based on review comments. Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/net/network_stats.cc ('k') | content/browser/renderer_host/p2p/socket_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/renderer/benchmarking_extension.h" 5 #include "chrome/renderer/benchmarking_extension.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/stats_table.h" 8 #include "base/metrics/stats_table.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 args.GetReturnValue().Set(static_cast<int32_t>(counter)); 112 args.GetReturnValue().Set(static_cast<int32_t>(counter));
113 } 113 }
114 114
115 static void IsSingleProcess(const v8::FunctionCallbackInfo<v8::Value>& args) { 115 static void IsSingleProcess(const v8::FunctionCallbackInfo<v8::Value>& args) {
116 args.GetReturnValue().Set(base::CommandLine::ForCurrentProcess()->HasSwitch( 116 args.GetReturnValue().Set(base::CommandLine::ForCurrentProcess()->HasSwitch(
117 switches::kSingleProcess)); 117 switches::kSingleProcess));
118 } 118 }
119 119
120 static void HiResTime(const v8::FunctionCallbackInfo<v8::Value>& args) { 120 static void HiResTime(const v8::FunctionCallbackInfo<v8::Value>& args) {
121 args.GetReturnValue().Set( 121 args.GetReturnValue().Set(
122 static_cast<double>(base::TimeTicks::HighResNow().ToInternalValue())); 122 static_cast<double>(base::TimeTicks::Now().ToInternalValue()));
123 } 123 }
124 }; 124 };
125 125
126 v8::Extension* BenchmarkingExtension::Get() { 126 v8::Extension* BenchmarkingExtension::Get() {
127 return new BenchmarkingWrapper(); 127 return new BenchmarkingWrapper();
128 } 128 }
129 129
130 } // namespace extensions_v8 130 } // namespace extensions_v8
OLDNEW
« no previous file with comments | « chrome/browser/net/network_stats.cc ('k') | content/browser/renderer_host/p2p/socket_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698