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 base::TimeTicks navigation_start, | 10 base::TimeTicks navigation_start, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 UserInitiatedInfo::BrowserInitiated(), url, url, true /* did_commit */, | 50 UserInitiatedInfo::BrowserInitiated(), url, url, true /* did_commit */, |
51 page_load_metrics::END_NONE, | 51 page_load_metrics::END_NONE, |
52 page_load_metrics::UserInitiatedInfo::NotUserInitiated(), | 52 page_load_metrics::UserInitiatedInfo::NotUserInitiated(), |
53 base::TimeDelta(), page_load_metrics::PageLoadMetadata(), | 53 base::TimeDelta(), page_load_metrics::PageLoadMetadata(), |
54 page_load_metrics::PageLoadMetadata()); | 54 page_load_metrics::PageLoadMetadata()); |
55 } | 55 } |
56 | 56 |
57 ExtraRequestInfo::ExtraRequestInfo(bool was_cached, | 57 ExtraRequestInfo::ExtraRequestInfo(bool was_cached, |
58 int64_t raw_body_bytes, | 58 int64_t raw_body_bytes, |
59 bool data_reduction_proxy_used, | 59 bool data_reduction_proxy_used, |
| 60 bool was_lofi_response, |
60 int64_t original_network_content_length) | 61 int64_t original_network_content_length) |
61 : was_cached(was_cached), | 62 : was_cached(was_cached), |
62 raw_body_bytes(raw_body_bytes), | 63 raw_body_bytes(raw_body_bytes), |
63 data_reduction_proxy_used(data_reduction_proxy_used), | 64 data_reduction_proxy_used(data_reduction_proxy_used), |
| 65 was_lofi_response(was_lofi_response), |
64 original_network_content_length(original_network_content_length) {} | 66 original_network_content_length(original_network_content_length) {} |
65 | 67 |
66 ExtraRequestInfo::ExtraRequestInfo(const ExtraRequestInfo& other) = default; | 68 ExtraRequestInfo::ExtraRequestInfo(const ExtraRequestInfo& other) = default; |
67 | 69 |
68 ExtraRequestInfo::~ExtraRequestInfo() {} | 70 ExtraRequestInfo::~ExtraRequestInfo() {} |
69 | 71 |
70 FailedProvisionalLoadInfo::FailedProvisionalLoadInfo(base::TimeDelta interval, | 72 FailedProvisionalLoadInfo::FailedProvisionalLoadInfo(base::TimeDelta interval, |
71 net::Error error) | 73 net::Error error) |
72 : time_to_failed_provisional_load(interval), error(error) {} | 74 : time_to_failed_provisional_load(interval), error(error) {} |
73 | 75 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 111 |
110 PageLoadMetricsObserver::ObservePolicy | 112 PageLoadMetricsObserver::ObservePolicy |
111 PageLoadMetricsObserver::ShouldObserveMimeType( | 113 PageLoadMetricsObserver::ShouldObserveMimeType( |
112 const std::string& mime_type) const { | 114 const std::string& mime_type) const { |
113 return mime_type == "text/html" || mime_type == "application/xhtml+xml" | 115 return mime_type == "text/html" || mime_type == "application/xhtml+xml" |
114 ? CONTINUE_OBSERVING | 116 ? CONTINUE_OBSERVING |
115 : STOP_OBSERVING; | 117 : STOP_OBSERVING; |
116 } | 118 } |
117 | 119 |
118 } // namespace page_load_metrics | 120 } // namespace page_load_metrics |
OLD | NEW |