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

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

Issue 2859393002: Report page load timing information for child frames. (Closed)
Patch Set: rebase Created 3 years, 7 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 "chrome/browser/page_load_metrics/page_load_metrics_util.h" 5 #include "chrome/browser/page_load_metrics/page_load_metrics_util.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "chrome/common/page_load_metrics/page_load_timing.h" 9 #include "chrome/common/page_load_metrics/page_load_timing.h"
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if (!a && !b) 101 if (!a && !b)
102 return a; // doesn't matter which 102 return a; // doesn't matter which
103 return base::Optional<base::TimeDelta>(std::min(a.value(), b.value())); 103 return base::Optional<base::TimeDelta>(std::min(a.value(), b.value()));
104 } 104 }
105 105
106 bool DidObserveLoadingBehaviorInAnyFrame( 106 bool DidObserveLoadingBehaviorInAnyFrame(
107 const page_load_metrics::PageLoadExtraInfo& info, 107 const page_load_metrics::PageLoadExtraInfo& info,
108 blink::WebLoadingBehaviorFlag behavior) { 108 blink::WebLoadingBehaviorFlag behavior) {
109 const int all_frame_loading_behavior_flags = 109 const int all_frame_loading_behavior_flags =
110 info.main_frame_metadata.behavior_flags | 110 info.main_frame_metadata.behavior_flags |
111 info.child_frame_metadata.behavior_flags; 111 info.subframe_metadata.behavior_flags;
112 112
113 return (all_frame_loading_behavior_flags & behavior) != 0; 113 return (all_frame_loading_behavior_flags & behavior) != 0;
114 } 114 }
115 115
116 } // namespace page_load_metrics 116 } // namespace page_load_metrics
OLDNEW
« no previous file with comments | « chrome/browser/page_load_metrics/page_load_metrics_util.h ('k') | chrome/browser/page_load_metrics/page_load_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698