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

Side by Side Diff: chrome/renderer/page_load_histograms.cc

Issue 1710733002: Move multipart resource handling to core/fetch (2/2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@multipart-cleanup
Patch Set: Created 4 years, 9 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
« no previous file with comments | « no previous file | components/page_load_metrics/renderer/metrics_render_frame_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/page_load_histograms.h" 5 #include "chrome/renderer/page_load_histograms.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
874 GetSupportedSchemeType(frame->document().url()); 874 GetSupportedSchemeType(frame->document().url());
875 if (scheme_type == 0) 875 if (scheme_type == 0)
876 return; 876 return;
877 877
878 // Don't dump stats for the NTP, as PageLoadHistograms should only be recorded 878 // Don't dump stats for the NTP, as PageLoadHistograms should only be recorded
879 // for pages visited due to an explicit user navigation. 879 // for pages visited due to an explicit user navigation.
880 if (SearchBouncer::GetInstance()->IsNewTabPage(frame->document().url())) { 880 if (SearchBouncer::GetInstance()->IsNewTabPage(frame->document().url())) {
881 return; 881 return;
882 } 882 }
883 883
884 // Ignore multipart requests.
885 if (frame->dataSource()->response().isMultipartPayload())
886 return;
887
888 DocumentState* document_state = 884 DocumentState* document_state =
889 DocumentState::FromDataSource(frame->dataSource()); 885 DocumentState::FromDataSource(frame->dataSource());
890 886
891 bool data_reduction_proxy_was_used = false; 887 bool data_reduction_proxy_was_used = false;
892 if (!document_state->proxy_server().IsEmpty()) { 888 if (!document_state->proxy_server().IsEmpty()) {
893 bool handled = 889 bool handled =
894 Send(new DataReductionProxyViewHostMsg_IsDataReductionProxy( 890 Send(new DataReductionProxyViewHostMsg_IsDataReductionProxy(
895 document_state->proxy_server(), &data_reduction_proxy_was_used)); 891 document_state->proxy_server(), &data_reduction_proxy_was_used));
896 // If the IPC call is not handled, then |data_reduction_proxy_was_used| 892 // If the IPC call is not handled, then |data_reduction_proxy_was_used|
897 // should remain |false|. 893 // should remain |false|.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
963 959
964 DCHECK(document_state); 960 DCHECK(document_state);
965 DCHECK(ds); 961 DCHECK(ds);
966 GURL url(ds->request().url()); 962 GURL url(ds->request().url());
967 Time start = document_state->start_load_time(); 963 Time start = document_state->start_load_time();
968 Time finish = document_state->finish_load_time(); 964 Time finish = document_state->finish_load_time();
969 // TODO(mbelshe): should we log more stats? 965 // TODO(mbelshe): should we log more stats?
970 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms " 966 VLOG(1) << "PLT: " << (finish - start).InMilliseconds() << "ms "
971 << url.spec(); 967 << url.spec();
972 } 968 }
OLDNEW
« no previous file with comments | « no previous file | components/page_load_metrics/renderer/metrics_render_frame_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698