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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 base::Optional<base::TimeDelta>() /* first_background_time */, | 47 base::Optional<base::TimeDelta>() /* first_background_time */, |
48 base::Optional<base::TimeDelta>() /* first_foreground_time */, | 48 base::Optional<base::TimeDelta>() /* first_foreground_time */, |
49 started_in_foreground /* started_in_foreground */, | 49 started_in_foreground /* started_in_foreground */, |
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( |
58 int64_t raw_body_bytes, | 58 bool was_cached, |
59 bool data_reduction_proxy_used, | 59 int64_t raw_body_bytes, |
60 int64_t original_network_content_length) | 60 int64_t original_network_content_length, |
61 std::unique_ptr<data_reduction_proxy::DataReductionProxyData> | |
62 data_reduction_proxy_data) | |
61 : was_cached(was_cached), | 63 : was_cached(was_cached), |
62 raw_body_bytes(raw_body_bytes), | 64 raw_body_bytes(raw_body_bytes), |
63 data_reduction_proxy_used(data_reduction_proxy_used), | 65 original_network_content_length(original_network_content_length), |
64 original_network_content_length(original_network_content_length) {} | 66 data_reduction_proxy_data(std::move(data_reduction_proxy_data)) {} |
Charlie Harrison
2017/04/20 20:52:50
#include <utility> for std::move
RyanSturm
2017/04/20 21:33:00
Done.
| |
65 | |
66 ExtraRequestInfo::ExtraRequestInfo(const ExtraRequestInfo& other) = default; | |
67 | 67 |
68 ExtraRequestInfo::~ExtraRequestInfo() {} | 68 ExtraRequestInfo::~ExtraRequestInfo() {} |
69 | 69 |
70 FailedProvisionalLoadInfo::FailedProvisionalLoadInfo(base::TimeDelta interval, | 70 FailedProvisionalLoadInfo::FailedProvisionalLoadInfo(base::TimeDelta interval, |
71 net::Error error) | 71 net::Error error) |
72 : time_to_failed_provisional_load(interval), error(error) {} | 72 : time_to_failed_provisional_load(interval), error(error) {} |
73 | 73 |
74 FailedProvisionalLoadInfo::~FailedProvisionalLoadInfo() {} | 74 FailedProvisionalLoadInfo::~FailedProvisionalLoadInfo() {} |
75 | 75 |
76 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnStart( | 76 PageLoadMetricsObserver::ObservePolicy PageLoadMetricsObserver::OnStart( |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 | 109 |
110 PageLoadMetricsObserver::ObservePolicy | 110 PageLoadMetricsObserver::ObservePolicy |
111 PageLoadMetricsObserver::ShouldObserveMimeType( | 111 PageLoadMetricsObserver::ShouldObserveMimeType( |
112 const std::string& mime_type) const { | 112 const std::string& mime_type) const { |
113 return mime_type == "text/html" || mime_type == "application/xhtml+xml" | 113 return mime_type == "text/html" || mime_type == "application/xhtml+xml" |
114 ? CONTINUE_OBSERVING | 114 ? CONTINUE_OBSERVING |
115 : STOP_OBSERVING; | 115 : STOP_OBSERVING; |
116 } | 116 } |
117 | 117 |
118 } // namespace page_load_metrics | 118 } // namespace page_load_metrics |
OLD | NEW |