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

Side by Side Diff: content/renderer/input/input_handler_proxy.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: 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "content/renderer/input/input_handler_proxy.h" 5 #include "content/renderer/input/input_handler_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 return; 125 return;
126 } 126 }
127 127
128 ui::LatencyInfo::LatencyMap::const_iterator it = 128 ui::LatencyInfo::LatencyMap::const_iterator it =
129 latency_info.latency_components.find(std::make_pair( 129 latency_info.latency_components.find(std::make_pair(
130 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0)); 130 ui::INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 0));
131 131
132 if (it == latency_info.latency_components.end()) 132 if (it == latency_info.latency_components.end())
133 return; 133 return;
134 134
135 base::TimeDelta delta = base::TimeTicks::HighResNow() - it->second.event_time; 135 base::TimeDelta delta = base::TimeTicks::Now() - it->second.event_time;
136 for (size_t i = 0; i < it->second.event_count; ++i) { 136 for (size_t i = 0; i < it->second.event_count; ++i) {
137 switch (event.type) { 137 switch (event.type) {
138 case blink::WebInputEvent::GestureScrollBegin: 138 case blink::WebInputEvent::GestureScrollBegin:
139 UMA_HISTOGRAM_CUSTOM_COUNTS( 139 UMA_HISTOGRAM_CUSTOM_COUNTS(
140 "Event.Latency.RendererImpl.GestureScrollBegin", 140 "Event.Latency.RendererImpl.GestureScrollBegin",
141 delta.InMicroseconds(), 1, 1000000, 100); 141 delta.InMicroseconds(), 1, 1000000, 100);
142 break; 142 break;
143 case blink::WebInputEvent::GestureScrollUpdate: 143 case blink::WebInputEvent::GestureScrollUpdate:
144 UMA_HISTOGRAM_CUSTOM_COUNTS( 144 UMA_HISTOGRAM_CUSTOM_COUNTS(
145 // So named for historical reasons. 145 // So named for historical reasons.
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 // trigger a scroll, e.g., with a trivial time delta between fling updates. 924 // trigger a scroll, e.g., with a trivial time delta between fling updates.
925 // Return true in this case to prevent early fling termination. 925 // Return true in this case to prevent early fling termination.
926 if (std::abs(clipped_increment.width) < kScrollEpsilon && 926 if (std::abs(clipped_increment.width) < kScrollEpsilon &&
927 std::abs(clipped_increment.height) < kScrollEpsilon) 927 std::abs(clipped_increment.height) < kScrollEpsilon)
928 return true; 928 return true;
929 929
930 return did_scroll; 930 return did_scroll;
931 } 931 }
932 932
933 } // namespace content 933 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698