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_observer.h" | 5 #include "chrome/browser/page_load_metrics/page_load_metrics_observer.h" |
6 | 6 |
7 namespace page_load_metrics { | 7 namespace page_load_metrics { |
8 | 8 |
9 PageLoadExtraInfo::PageLoadExtraInfo( | 9 PageLoadExtraInfo::PageLoadExtraInfo( |
10 const base::Optional<base::TimeDelta>& first_background_time, | 10 const base::Optional<base::TimeDelta>& first_background_time, |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 return CONTINUE_OBSERVING; | 78 return CONTINUE_OBSERVING; |
79 } | 79 } |
80 | 80 |
81 PageLoadMetricsObserver::ObservePolicy | 81 PageLoadMetricsObserver::ObservePolicy |
82 PageLoadMetricsObserver::FlushMetricsOnAppEnterBackground( | 82 PageLoadMetricsObserver::FlushMetricsOnAppEnterBackground( |
83 const PageLoadTiming& timing, | 83 const PageLoadTiming& timing, |
84 const PageLoadExtraInfo& extra_info) { | 84 const PageLoadExtraInfo& extra_info) { |
85 return CONTINUE_OBSERVING; | 85 return CONTINUE_OBSERVING; |
86 } | 86 } |
87 | 87 |
| 88 PageLoadMetricsObserver::ObservePolicy |
| 89 PageLoadMetricsObserver::ShouldObserveMimeType( |
| 90 const std::string& mime_type) const { |
| 91 return mime_type == "text/html" || mime_type == "application/xhtml+xml" |
| 92 ? CONTINUE_OBSERVING |
| 93 : STOP_OBSERVING; |
| 94 } |
| 95 |
88 } // namespace page_load_metrics | 96 } // namespace page_load_metrics |
OLD | NEW |