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

Side by Side Diff: content/renderer/stats_collection_observer.cc

Issue 18154002: Use a direct include of time headers in content/, part 2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
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/stats_collection_observer.h" 5 #include "content/renderer/stats_collection_observer.h"
6 6
7 #include "base/time.h" 7 #include "base/time/time.h"
8 #include "content/renderer/render_view_impl.h" 8 #include "content/renderer/render_view_impl.h"
9 9
10 namespace content { 10 namespace content {
11 11
12 StatsCollectionObserver::StatsCollectionObserver(RenderViewImpl* render_view) 12 StatsCollectionObserver::StatsCollectionObserver(RenderViewImpl* render_view)
13 : RenderViewObserver(render_view) { 13 : RenderViewObserver(render_view) {
14 } 14 }
15 15
16 StatsCollectionObserver::~StatsCollectionObserver() { 16 StatsCollectionObserver::~StatsCollectionObserver() {
17 } 17 }
18 18
19 void StatsCollectionObserver::DidStartLoading() { 19 void StatsCollectionObserver::DidStartLoading() {
20 DCHECK(start_time_.is_null()); 20 DCHECK(start_time_.is_null());
21 start_time_ = base::TimeTicks::Now(); 21 start_time_ = base::TimeTicks::Now();
22 } 22 }
23 23
24 void StatsCollectionObserver::DidStopLoading() { 24 void StatsCollectionObserver::DidStopLoading() {
25 DCHECK(stop_time_.is_null()); 25 DCHECK(stop_time_.is_null());
26 stop_time_ = base::TimeTicks::Now(); 26 stop_time_ = base::TimeTicks::Now();
27 27
28 // Stop observing so we don't get called again. 28 // Stop observing so we don't get called again.
29 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view()); 29 RenderViewImpl* impl = static_cast<RenderViewImpl*>(render_view());
30 impl->RemoveObserver(this); 30 impl->RemoveObserver(this);
31 } 31 }
32 32
33 } // namespace content 33 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/stats_collection_observer.h ('k') | content/shell/renderer/webkit_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698