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

Side by Side Diff: components/page_load_metrics/renderer/metrics_render_frame_observer.cc

Issue 1355063004: Template methods on Timer classes instead of the classes themselves. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer: fixcaller Created 5 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/page_load_metrics/renderer/metrics_render_frame_observer.h" 5 #include "components/page_load_metrics/renderer/metrics_render_frame_observer.h"
6 6
7 #include "base/time/time.h" 7 #include "base/time/time.h"
8 #include "base/timer/timer.h" 8 #include "base/timer/timer.h"
9 #include "components/page_load_metrics/renderer/page_timing_metrics_sender.h" 9 #include "components/page_load_metrics/renderer/page_timing_metrics_sender.h"
10 #include "content/public/renderer/render_frame.h" 10 #include "content/public/renderer/render_frame.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 timing.navigation_start = base::Time::FromDoubleT(start); 108 timing.navigation_start = base::Time::FromDoubleT(start);
109 timing.response_start = ClampDelta(perf.responseStart(), start); 109 timing.response_start = ClampDelta(perf.responseStart(), start);
110 timing.dom_content_loaded_event_start = 110 timing.dom_content_loaded_event_start =
111 ClampDelta(perf.domContentLoadedEventStart(), start); 111 ClampDelta(perf.domContentLoadedEventStart(), start);
112 timing.load_event_start = ClampDelta(perf.loadEventStart(), start); 112 timing.load_event_start = ClampDelta(perf.loadEventStart(), start);
113 timing.first_layout = ClampDelta(perf.firstLayout(), start); 113 timing.first_layout = ClampDelta(perf.firstLayout(), start);
114 return timing; 114 return timing;
115 } 115 }
116 116
117 scoped_ptr<base::Timer> MetricsRenderFrameObserver::CreateTimer() const { 117 scoped_ptr<base::Timer> MetricsRenderFrameObserver::CreateTimer() const {
118 return scoped_ptr<base::Timer>( 118 return make_scoped_ptr(new base::OneShotTimer);
119 new base::OneShotTimer<PageTimingMetricsSender>());
120 } 119 }
121 120
122 } // namespace page_load_metrics 121 } // namespace page_load_metrics
OLDNEW
« no previous file with comments | « components/omnibox/browser/search_provider.h ('k') | components/password_manager/core/browser/affiliated_match_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698