OLD | NEW |
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 Loading... |
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 |
OLD | NEW |