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

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

Issue 2699213002: Adding MHTML support into Page Load Metrics (Closed)
Patch Set: Only observe MHTML for previews observer Created 3 years, 10 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698