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

Side by Side Diff: chrome/browser/page_load_metrics/page_load_tracker.cc

Issue 2901383002: Buffer cross frame paint timing updates. (Closed)
Patch Set: factor WeakMockTimer into a common location. Created 3 years, 6 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/browser/page_load_metrics/page_load_tracker.h" 5 #include "chrome/browser/page_load_metrics/page_load_tracker.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <ostream> 8 #include <ostream>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 191 }
192 192
193 PageLoadTracker::~PageLoadTracker() { 193 PageLoadTracker::~PageLoadTracker() {
194 if (app_entered_background_) { 194 if (app_entered_background_) {
195 RecordAppBackgroundPageLoadCompleted(true); 195 RecordAppBackgroundPageLoadCompleted(true);
196 } 196 }
197 197
198 if (did_stop_tracking_) 198 if (did_stop_tracking_)
199 return; 199 return;
200 200
201 metrics_update_dispatcher_.ShutDown();
Charlie Harrison 2017/05/30 14:49:07 optional: It seems a bit strange to have a Shutdow
Bryan McQuade 2017/05/30 15:30:23 It's not that unusual / strange - see https://cs.c
202
201 if (page_end_time_.is_null()) { 203 if (page_end_time_.is_null()) {
202 // page_end_time_ can be unset in some cases, such as when a navigation is 204 // page_end_time_ can be unset in some cases, such as when a navigation is
203 // aborted by a navigation that started before it. In these cases, set the 205 // aborted by a navigation that started before it. In these cases, set the
204 // end time to the current time. 206 // end time to the current time.
205 RecordInternalError(ERR_NO_PAGE_LOAD_END_TIME); 207 RecordInternalError(ERR_NO_PAGE_LOAD_END_TIME);
206 NotifyPageEnd(END_OTHER, UserInitiatedInfo::NotUserInitiated(), 208 NotifyPageEnd(END_OTHER, UserInitiatedInfo::NotUserInitiated(),
207 base::TimeTicks::Now(), true); 209 base::TimeTicks::Now(), true);
208 } 210 }
209 211
210 if (!did_commit_) { 212 if (!did_commit_) {
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 } 621 }
620 622
621 void PageLoadTracker::OnSubframeMetadataChanged() { 623 void PageLoadTracker::OnSubframeMetadataChanged() {
622 PageLoadExtraInfo extra_info(ComputePageLoadExtraInfo()); 624 PageLoadExtraInfo extra_info(ComputePageLoadExtraInfo());
623 for (const auto& observer : observers_) { 625 for (const auto& observer : observers_) {
624 observer->OnLoadingBehaviorObserved(extra_info); 626 observer->OnLoadingBehaviorObserved(extra_info);
625 } 627 }
626 } 628 }
627 629
628 } // namespace page_load_metrics 630 } // namespace page_load_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698