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

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

Issue 2874663005: [Page Load Metrics] Add mojom file to page load metrics. (Closed)
Patch Set: 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_observer.h" 5 #include "chrome/browser/page_load_metrics/page_load_metrics_observer.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 namespace page_load_metrics { 9 namespace page_load_metrics {
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 const GURL& url, 45 const GURL& url,
46 bool started_in_foreground) { 46 bool started_in_foreground) {
47 return PageLoadExtraInfo( 47 return PageLoadExtraInfo(
48 base::TimeTicks::Now() /* navigation_start */, 48 base::TimeTicks::Now() /* navigation_start */,
49 base::Optional<base::TimeDelta>() /* first_background_time */, 49 base::Optional<base::TimeDelta>() /* first_background_time */,
50 base::Optional<base::TimeDelta>() /* first_foreground_time */, 50 base::Optional<base::TimeDelta>() /* first_foreground_time */,
51 started_in_foreground /* started_in_foreground */, 51 started_in_foreground /* started_in_foreground */,
52 UserInitiatedInfo::BrowserInitiated(), url, url, true /* did_commit */, 52 UserInitiatedInfo::BrowserInitiated(), url, url, true /* did_commit */,
53 page_load_metrics::END_NONE, 53 page_load_metrics::END_NONE,
54 page_load_metrics::UserInitiatedInfo::NotUserInitiated(), 54 page_load_metrics::UserInitiatedInfo::NotUserInitiated(),
55 base::TimeDelta(), page_load_metrics::PageLoadMetadata(), 55 base::TimeDelta(), page_load_metrics::mojom::PageLoadMetadata(),
56 page_load_metrics::PageLoadMetadata()); 56 page_load_metrics::mojom::PageLoadMetadata());
57 } 57 }
58 58
59 ExtraRequestCompleteInfo::ExtraRequestCompleteInfo( 59 ExtraRequestCompleteInfo::ExtraRequestCompleteInfo(
60 const GURL& url, 60 const GURL& url,
61 int frame_tree_node_id, 61 int frame_tree_node_id,
62 bool was_cached, 62 bool was_cached,
63 int64_t raw_body_bytes, 63 int64_t raw_body_bytes,
64 int64_t original_network_content_length, 64 int64_t original_network_content_length,
65 std::unique_ptr<data_reduction_proxy::DataReductionProxyData> 65 std::unique_ptr<data_reduction_proxy::DataReductionProxyData>
66 data_reduction_proxy_data, 66 data_reduction_proxy_data,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 PageLoadMetricsObserver::ObservePolicy 132 PageLoadMetricsObserver::ObservePolicy
133 PageLoadMetricsObserver::ShouldObserveMimeType( 133 PageLoadMetricsObserver::ShouldObserveMimeType(
134 const std::string& mime_type) const { 134 const std::string& mime_type) const {
135 return mime_type == "text/html" || mime_type == "application/xhtml+xml" 135 return mime_type == "text/html" || mime_type == "application/xhtml+xml"
136 ? CONTINUE_OBSERVING 136 ? CONTINUE_OBSERVING
137 : STOP_OBSERVING; 137 : STOP_OBSERVING;
138 } 138 }
139 139
140 } // namespace page_load_metrics 140 } // namespace page_load_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698