Index: chrome/renderer/page_load_histograms.cc |
diff --git a/chrome/renderer/page_load_histograms.cc b/chrome/renderer/page_load_histograms.cc |
index df435a6e45aa053366f392323963fe1c90988281..937b5ab5d3bea4b14d9fa5f7c1489cfaa6ebedb2 100644 |
--- a/chrome/renderer/page_load_histograms.cc |
+++ b/chrome/renderer/page_load_histograms.cc |
@@ -15,22 +15,20 @@ |
#include "base/metrics/histogram.h" |
#include "base/metrics/persistent_histogram_allocator.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/string_split.h" |
#include "base/strings/string_util.h" |
#include "base/strings/stringprintf.h" |
#include "base/strings/utf_string_conversions.h" |
#include "base/time/time.h" |
#include "chrome/common/chrome_switches.h" |
#include "chrome/renderer/searchbox/search_bouncer.h" |
-#include "components/data_reduction_proxy/content/common/data_reduction_proxy_messages.h" |
-#include "components/data_reduction_proxy/core/common/data_reduction_proxy_params.h" |
#include "content/public/common/content_constants.h" |
#include "content/public/renderer/document_state.h" |
#include "content/public/renderer/render_frame.h" |
#include "content/public/renderer/render_thread.h" |
#include "content/public/renderer/render_view.h" |
#include "extensions/common/url_pattern.h" |
#include "net/base/url_util.h" |
#include "net/http/http_response_headers.h" |
#include "third_party/WebKit/public/platform/URLConversion.h" |
#include "third_party/WebKit/public/platform/WebURLRequest.h" |
@@ -113,56 +111,20 @@ void PltHistogramWithGwsPreview(const char* name, |
std::string name_with_experiment_id = base::StringPrintf( \ |
"%s_FromGWS_Experiment%d", \ |
name, websearch_chrome_joint_experiment_id); \ |
PltHistogramWithNoMacroCaching(name_with_experiment_id, sample); \ |
} \ |
} \ |
PltHistogramWithGwsPreview(name, sample, is_preview, \ |
websearch_chrome_joint_experiment_id); \ |
} |
-// In addition to PLT_HISTOGRAM, add the *_DataReductionProxy variant |
-// conditionally. This macro runs only in one thread. |
-#define PLT_HISTOGRAM_DRP( \ |
- name, sample, data_reduction_proxy_was_used, scheme_type) \ |
- do { \ |
- static base::HistogramBase* counter(NULL); \ |
- static base::HistogramBase* drp_counter(NULL); \ |
- static base::HistogramBase* https_drp_counter(NULL); \ |
- if (!counter) { \ |
- DCHECK(drp_counter == NULL); \ |
- DCHECK(https_drp_counter == NULL); \ |
- counter = base::Histogram::FactoryTimeGet( \ |
- name, kPLTMin(), kPLTMax(), kPLTCount, \ |
- base::Histogram::kUmaTargetedHistogramFlag); \ |
- } \ |
- counter->AddTime(sample); \ |
- if (!data_reduction_proxy_was_used) break; \ |
- if (scheme_type & URLPattern::SCHEME_HTTPS) { \ |
- if (!https_drp_counter) { \ |
- https_drp_counter = base::Histogram::FactoryTimeGet( \ |
- std::string(name) + "_HTTPS_DataReductionProxy", \ |
- kPLTMin(), kPLTMax(), kPLTCount, \ |
- base::Histogram::kUmaTargetedHistogramFlag); \ |
- } \ |
- https_drp_counter->AddTime(sample); \ |
- } else { \ |
- if (!drp_counter) { \ |
- drp_counter = base::Histogram::FactoryTimeGet( \ |
- std::string(name) + "_DataReductionProxy", \ |
- kPLTMin(), kPLTMax(), kPLTCount, \ |
- base::Histogram::kUmaTargetedHistogramFlag); \ |
- } \ |
- drp_counter->AddTime(sample); \ |
- } \ |
- } while (0) |
- |
// Returns the scheme type of the given URL if its type is one for which we |
// dump page load histograms. Otherwise returns NULL. |
URLPattern::SchemeMasks GetSupportedSchemeType(const GURL& url) { |
if (url.SchemeIs("http")) |
return URLPattern::SCHEME_HTTP; |
else if (url.SchemeIs("https")) |
return URLPattern::SCHEME_HTTPS; |
return static_cast<URLPattern::SchemeMasks>(0); |
} |
@@ -221,51 +183,39 @@ int GetQueryStringBasedExperiment(const GURL& referrer) { |
int experiment_id; |
if (!base::StringToInt(value, &experiment_id)) |
return kNoExperiment; |
if (0 < experiment_id && experiment_id <= kMaxExperimentID) |
return experiment_id; |
return kNoExperiment; |
} |
void DumpHistograms(const WebPerformance& performance, |
DocumentState* document_state, |
- bool data_reduction_proxy_was_used, |
- bool lofi_active_for_page, // LoFi was used, unless part of |
- // the control group. |
bool came_from_websearch, |
int websearch_chrome_joint_experiment_id, |
bool is_preview, |
URLPattern::SchemeMasks scheme_type) { |
// This function records new histograms based on the Navigation Timing |
// records. As such, the histograms should not depend on the deprecated timing |
// information collected in DocumentState. However, here for some reason we |
// check if document_state->request_time() is null. TODO(ppi): find out why |
// and remove DocumentState from the parameter list. |
Time request = document_state->request_time(); |
Time navigation_start = Time::FromDoubleT(performance.navigationStart()); |
- Time domain_lookup_start = Time::FromDoubleT(performance.domainLookupStart()); |
- Time domain_lookup_end = Time::FromDoubleT(performance.domainLookupEnd()); |
- Time connect_start = Time::FromDoubleT(performance.connectStart()); |
- Time connect_end = Time::FromDoubleT(performance.connectEnd()); |
Time request_start = Time::FromDoubleT(performance.requestStart()); |
Time response_start = Time::FromDoubleT(performance.responseStart()); |
- Time dom_loading = Time::FromDoubleT(performance.domLoading()); |
- Time dom_interactive = Time::FromDoubleT(performance.domInteractive()); |
Time dom_content_loaded_start = |
Time::FromDoubleT(performance.domContentLoadedEventStart()); |
- Time dom_content_loaded_end = |
- Time::FromDoubleT(performance.domContentLoadedEventEnd()); |
Time load_event_start = Time::FromDoubleT(performance.loadEventStart()); |
Time load_event_end = Time::FromDoubleT(performance.loadEventEnd()); |
Time begin = (request.is_null() ? navigation_start : request_start); |
- Time first_paint = document_state->first_paint_time(); |
DCHECK(!navigation_start.is_null()); |
// It is possible for a document to have navigation_start time, but no |
// request_start. An example is doing a window.open, which synchronously |
// loads "about:blank", then using document.write add a meta http-equiv |
// refresh tag, which causes a navigation. In such case, we will arrive at |
// this function with no request/response timing data and identical load |
// start/end values. Avoid logging this case, as it doesn't add any |
// meaningful information to the histogram. |
@@ -275,85 +225,39 @@ void DumpHistograms(const WebPerformance& performance, |
// TODO(dominich): Investigate conditions under which |load_event_start| and |
// |load_event_end| may be NULL as in the non-PT_ case below. Examples in |
// http://crbug.com/112006. |
// DCHECK(!load_event_start.is_null()); |
// DCHECK(!load_event_end.is_null()); |
if (document_state->web_timing_histograms_recorded()) |
return; |
document_state->set_web_timing_histograms_recorded(true); |
- PLT_HISTOGRAM_DRP("PLT.NT_DomainLookup", |
Bryan McQuade
2016/09/07 18:24:32
IIUC PLT_HISTOGRAM_DRP logged both a DRP histogram
RyanSturm
2016/09/07 18:36:16
I removed these because I thought DRP were the own
Bryan McQuade
2016/09/07 19:08:15
Ah, in that case, let's go ahead and remove them a
|
- domain_lookup_end - domain_lookup_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- PLT_HISTOGRAM_DRP("PLT.NT_Connect", |
- connect_end - connect_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- |
- if (!dom_interactive.is_null() && !dom_loading.is_null()) { |
- PLT_HISTOGRAM_DRP("PLT.NT_DomLoading", |
- dom_interactive - dom_loading, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- } |
- if (!dom_content_loaded_start.is_null() && !dom_interactive.is_null()) { |
- PLT_HISTOGRAM_DRP("PLT.NT_DomInteractive", |
- dom_content_loaded_start - dom_interactive, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- } |
- if (!dom_content_loaded_start.is_null() && |
- !dom_content_loaded_end.is_null() ) { |
- PLT_HISTOGRAM_DRP("PLT.NT_DomContentLoaded", |
- dom_content_loaded_end - dom_content_loaded_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- } |
- |
// TODO(simonjam): There is no way to distinguish between abandonment and |
// intentional Javascript navigation before the load event fires. |
// TODO(dominich): Load type breakdown |
if (!load_event_start.is_null()) { |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_BeginToFinishDoc", |
load_event_start - begin, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_CommitToFinishDoc", |
load_event_start - response_start, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_RequestToFinishDoc", |
load_event_start - navigation_start, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
- if (data_reduction_proxy_was_used) { |
- if (scheme_type & URLPattern::SCHEME_HTTPS) { |
- PLT_HISTOGRAM("PLT.PT_BeginToFinishDoc_HTTPS_DataReductionProxy", |
- load_event_start - begin); |
- PLT_HISTOGRAM("PLT.PT_CommitToFinishDoc_HTTPS_DataReductionProxy", |
- load_event_start - response_start); |
- PLT_HISTOGRAM("PLT.PT_RequestToFinishDoc_HTTPS_DataReductionProxy", |
- load_event_start - navigation_start); |
- } else { |
- PLT_HISTOGRAM("PLT.PT_BeginToFinishDoc_DataReductionProxy", |
- load_event_start - begin); |
- PLT_HISTOGRAM("PLT.PT_CommitToFinishDoc_DataReductionProxy", |
- load_event_start - response_start); |
- PLT_HISTOGRAM("PLT.PT_RequestToFinishDoc_DataReductionProxy", |
- load_event_start - navigation_start); |
- } |
- } |
} |
if (!load_event_end.is_null()) { |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_BeginToFinish", |
load_event_end - begin, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_CommitToFinish", |
load_event_end - response_start, |
came_from_websearch, |
@@ -362,171 +266,31 @@ void DumpHistograms(const WebPerformance& performance, |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_RequestToFinish", |
load_event_end - navigation_start, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_StartToFinish", |
load_event_end - request_start, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
- if (data_reduction_proxy_was_used) { |
- // TODO(megjablon): Move these repetitive cases into an anonymous |
- // function. |
- bool in_lofi_enabled_group = |
- data_reduction_proxy::params::IsIncludedInLoFiEnabledFieldTrial(); |
- bool in_lofi_control_group = |
- data_reduction_proxy::params::IsIncludedInLoFiControlFieldTrial(); |
- if (scheme_type & URLPattern::SCHEME_HTTPS) { |
- PLT_HISTOGRAM("PLT.PT_BeginToFinish_HTTPS_DataReductionProxy", |
- load_event_end - begin); |
- PLT_HISTOGRAM("PLT.PT_CommitToFinish_HTTPS_DataReductionProxy", |
- load_event_end - response_start); |
- PLT_HISTOGRAM("PLT.PT_RequestToFinish_HTTPS_DataReductionProxy", |
- load_event_end - navigation_start); |
- PLT_HISTOGRAM("PLT.PT_StartToFinish_HTTPS_DataReductionProxy", |
- load_event_end - request_start); |
- if (lofi_active_for_page && in_lofi_enabled_group) { |
- PLT_HISTOGRAM( |
- "PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_AutoLoFiOn", |
- load_event_end - begin); |
- PLT_HISTOGRAM( |
- "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_AutoLoFiOn", |
- load_event_end - response_start); |
- PLT_HISTOGRAM( |
- "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_AutoLoFiOn", |
- load_event_end - navigation_start); |
- PLT_HISTOGRAM( |
- "PLT.PT_StartToFinish_HTTPS_DataReductionProxy_AutoLoFiOn", |
- load_event_end - request_start); |
- if (!first_paint.is_null()) { |
- PLT_HISTOGRAM( |
- "PLT.BeginToFirstPaint_HTTPS_DataReductionProxy_AutoLoFiOn", |
- first_paint - begin); |
- } |
- } else if (lofi_active_for_page && in_lofi_control_group) { |
- PLT_HISTOGRAM( |
- "PLT.PT_BeginToFinish_HTTPS_DataReductionProxy_AutoLoFiOff", |
- load_event_end - begin); |
- PLT_HISTOGRAM( |
- "PLT.PT_CommitToFinish_HTTPS_DataReductionProxy_AutoLoFiOff", |
- load_event_end - response_start); |
- PLT_HISTOGRAM( |
- "PLT.PT_RequestToFinish_HTTPS_DataReductionProxy_AutoLoFiOff", |
- load_event_end - navigation_start); |
- PLT_HISTOGRAM( |
- "PLT.PT_StartToFinish_HTTPS_DataReductionProxy_AutoLoFiOff", |
- load_event_end - request_start); |
- if (!first_paint.is_null()) { |
- PLT_HISTOGRAM( |
- "PLT.BeginToFirstPaint_HTTPS_DataReductionProxy_AutoLoFiOff", |
- first_paint - begin); |
- } |
- } |
- } else { |
- PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy", |
- load_event_end - begin); |
- PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy", |
- load_event_end - response_start); |
- PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy", |
- load_event_end - navigation_start); |
- PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy", |
- load_event_end - request_start); |
- if (lofi_active_for_page && in_lofi_enabled_group) { |
- PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_AutoLoFiOn", |
- load_event_end - begin); |
- PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_AutoLoFiOn", |
- load_event_end - response_start); |
- PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_AutoLoFiOn", |
- load_event_end - navigation_start); |
- PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_AutoLoFiOn", |
- load_event_end - request_start); |
- if (!first_paint.is_null()) { |
- PLT_HISTOGRAM("PLT.BeginToFirstPaint_DataReductionProxy_AutoLoFiOn", |
- first_paint - begin); |
- } |
- } else if (lofi_active_for_page && in_lofi_control_group) { |
- PLT_HISTOGRAM("PLT.PT_BeginToFinish_DataReductionProxy_AutoLoFiOff", |
- load_event_end - begin); |
- PLT_HISTOGRAM("PLT.PT_CommitToFinish_DataReductionProxy_AutoLoFiOff", |
- load_event_end - response_start); |
- PLT_HISTOGRAM("PLT.PT_RequestToFinish_DataReductionProxy_AutoLoFiOff", |
- load_event_end - navigation_start); |
- PLT_HISTOGRAM("PLT.PT_StartToFinish_DataReductionProxy_AutoLoFiOff", |
- load_event_end - request_start); |
- if (!first_paint.is_null()) { |
- PLT_HISTOGRAM( |
- "PLT.BeginToFirstPaint_DataReductionProxy_AutoLoFiOff", |
- first_paint - begin); |
- } |
- } |
- } |
- } |
} |
if (!load_event_start.is_null() && !load_event_end.is_null()) { |
PLT_HISTOGRAM("PLT.PT_FinishDocToFinish", |
load_event_end - load_event_start); |
- PLT_HISTOGRAM_DRP("PLT.NT_LoadEvent", |
Bryan McQuade
2016/09/07 18:24:32
same here
RyanSturm
2016/09/07 18:36:16
See other reply.
|
- load_event_end - load_event_start, |
- data_reduction_proxy_was_used, |
- scheme_type); |
- |
- if (data_reduction_proxy_was_used) { |
- if (scheme_type & URLPattern::SCHEME_HTTPS) { |
- PLT_HISTOGRAM("PLT.PT_FinishDocToFinish_HTTPS_DataReductionProxy", |
- load_event_end - load_event_start); |
- } else { |
- PLT_HISTOGRAM("PLT.PT_FinishDocToFinish_DataReductionProxy", |
- load_event_end - load_event_start); |
- } |
- } |
} |
if (!dom_content_loaded_start.is_null()) { |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_RequestToDomContentLoaded", |
dom_content_loaded_start - navigation_start, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
- if (data_reduction_proxy_was_used) { |
- bool in_lofi_enabled_group = |
- data_reduction_proxy::params::IsIncludedInLoFiEnabledFieldTrial(); |
- bool in_lofi_control_group = |
- data_reduction_proxy::params::IsIncludedInLoFiControlFieldTrial(); |
- if (scheme_type & URLPattern::SCHEME_HTTPS) { |
- PLT_HISTOGRAM( |
- "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy", |
- dom_content_loaded_start - navigation_start); |
- if (lofi_active_for_page && in_lofi_enabled_group) { |
- PLT_HISTOGRAM( |
- "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_" |
- "AutoLoFiOn", |
- dom_content_loaded_start - navigation_start); |
- } else if (lofi_active_for_page && in_lofi_control_group) { |
- PLT_HISTOGRAM( |
- "PLT.PT_RequestToDomContentLoaded_HTTPS_DataReductionProxy_" |
- "AutoLoFiOff", |
- dom_content_loaded_start - navigation_start); |
- } |
- } else { |
- PLT_HISTOGRAM("PLT.PT_RequestToDomContentLoaded_DataReductionProxy", |
- dom_content_loaded_start - navigation_start); |
- if (lofi_active_for_page && in_lofi_enabled_group) { |
- PLT_HISTOGRAM( |
- "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_AutoLoFiOn", |
- dom_content_loaded_start - navigation_start); |
- } else if (lofi_active_for_page && in_lofi_control_group) { |
- PLT_HISTOGRAM( |
- "PLT.PT_RequestToDomContentLoaded_DataReductionProxy_AutoLoFiOff", |
- dom_content_loaded_start - navigation_start); |
- } |
- } |
- } |
} |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_BeginToCommit", |
response_start - begin, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_RequestToStart", |
request_start - navigation_start, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
@@ -534,59 +298,37 @@ void DumpHistograms(const WebPerformance& performance, |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_StartToCommit", |
response_start - request_start, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
PLT_HISTOGRAM_WITH_GWS_VARIANT("PLT.PT_RequestToCommit", |
response_start - navigation_start, |
came_from_websearch, |
websearch_chrome_joint_experiment_id, |
is_preview); |
- if (data_reduction_proxy_was_used) { |
- if (scheme_type & URLPattern::SCHEME_HTTPS) { |
- PLT_HISTOGRAM("PLT.PT_BeginToCommit_HTTPS_DataReductionProxy", |
- response_start - begin); |
- PLT_HISTOGRAM("PLT.PT_RequestToStart_HTTPS_DataReductionProxy", |
- request_start - navigation_start); |
- PLT_HISTOGRAM("PLT.PT_StartToCommit_HTTPS_DataReductionProxy", |
- response_start - request_start); |
- PLT_HISTOGRAM("PLT.PT_RequestToCommit_HTTPS_DataReductionProxy", |
- response_start - navigation_start); |
- } else { |
- PLT_HISTOGRAM("PLT.PT_BeginToCommit_DataReductionProxy", |
- response_start - begin); |
- PLT_HISTOGRAM("PLT.PT_RequestToStart_DataReductionProxy", |
- request_start - navigation_start); |
- PLT_HISTOGRAM("PLT.PT_StartToCommit_DataReductionProxy", |
- response_start - request_start); |
- PLT_HISTOGRAM("PLT.PT_RequestToCommit_DataReductionProxy", |
- response_start - navigation_start); |
- } |
- } |
} |
bool WasWebRequestUsedBySomeExtensions() { |
#if defined(ENABLE_EXTENSIONS) |
return ChromeExtensionsRendererClient::GetInstance()->extension_dispatcher() |
->WasWebRequestUsedBySomeExtensions(); |
#else |
return false; |
#endif |
} |
// These histograms are based on the timing information collected in |
// DocumentState. They should be transitioned to equivalents based on the |
// Navigation Timing records (see DumpPerformanceTiming()) or dropped if not |
// needed. Please do not add new metrics based on DocumentState. |
void DumpDeprecatedHistograms(const WebPerformance& performance, |
DocumentState* document_state, |
- bool data_reduction_proxy_was_used, |
bool came_from_websearch, |
int websearch_chrome_joint_experiment_id, |
bool is_preview, |
URLPattern::SchemeMasks scheme_type) { |
// If we've already dumped, do nothing. |
// This simple bool works because we only dump for the main frame. |
if (document_state->load_histograms_recorded()) |
return; |
// Abort if any of these is missing. |
@@ -745,25 +487,20 @@ void DumpDeprecatedHistograms(const WebPerformance& performance, |
case DocumentState::LINK_LOAD_CACHE_ONLY: |
PLT_HISTOGRAM("PLT.BeginToFinishDoc_LinkLoadCacheOnly", |
begin_to_finish_doc); |
PLT_HISTOGRAM("PLT.BeginToFinish_LinkLoadCacheOnly", |
begin_to_finish_all_loads); |
break; |
default: |
break; |
} |
- if (data_reduction_proxy_was_used) { |
- PLT_HISTOGRAM("PLT.BeginToFinishDoc_SpdyProxy", begin_to_finish_doc); |
- PLT_HISTOGRAM("PLT.BeginToFinish_SpdyProxy", begin_to_finish_all_loads); |
- } |
- |
if (document_state->was_prefetcher()) { |
PLT_HISTOGRAM("PLT.BeginToFinishDoc_ContentPrefetcher", |
begin_to_finish_doc); |
PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcher", |
begin_to_finish_all_loads); |
} |
if (document_state->was_referred_by_prefetcher()) { |
PLT_HISTOGRAM("PLT.BeginToFinishDoc_ContentPrefetcherReferrer", |
begin_to_finish_doc); |
PLT_HISTOGRAM("PLT.BeginToFinish_ContentPrefetcherReferrer", |
@@ -827,59 +564,41 @@ void PageLoadHistograms::Dump(WebFrame* frame) { |
// Don't dump stats for the NTP, as PageLoadHistograms should only be recorded |
// for pages visited due to an explicit user navigation. |
if (SearchBouncer::GetInstance()->IsNewTabPage(frame->document().url())) { |
return; |
} |
DocumentState* document_state = |
DocumentState::FromDataSource(frame->dataSource()); |
- bool data_reduction_proxy_was_used = false; |
- if (!document_state->proxy_server().IsEmpty()) { |
- bool handled = |
- Send(new DataReductionProxyViewHostMsg_IsDataReductionProxy( |
Bryan McQuade
2016/09/07 18:24:32
i just want to confirm that this IPC message is no
RyanSturm
2016/09/07 18:36:16
Yup. It's only used here, and I've deleted it in t
|
- document_state->proxy_server(), &data_reduction_proxy_was_used)); |
- // If the IPC call is not handled, then |data_reduction_proxy_was_used| |
- // should remain |false|. |
- DCHECK(handled || !data_reduction_proxy_was_used); |
- } |
- |
bool came_from_websearch = IsFromGoogleSearchResult( |
frame->document().url(), |
blink::WebStringToGURL(frame->document().referrer())); |
int websearch_chrome_joint_experiment_id = kNoExperiment; |
bool is_preview = false; |
if (came_from_websearch) { |
websearch_chrome_joint_experiment_id = GetQueryStringBasedExperiment( |
blink::WebStringToGURL(frame->document().referrer())); |
is_preview = ViaHeaderContains(frame, "1.1 Google Instant Proxy Preview"); |
} |
- content::RenderFrame* render_frame = |
- content::RenderFrame::FromWebFrame(frame); |
- |
// Metrics based on the timing information recorded for the Navigation Timing |
// API - http://www.w3.org/TR/navigation-timing/. |
- DumpHistograms( |
- frame->performance(), document_state, data_reduction_proxy_was_used, |
- render_frame && render_frame->IsUsingLoFi(), came_from_websearch, |
- websearch_chrome_joint_experiment_id, is_preview, scheme_type); |
+ DumpHistograms(frame->performance(), document_state, came_from_websearch, |
+ websearch_chrome_joint_experiment_id, is_preview, scheme_type); |
// Old metrics based on the timing information stored in DocumentState. These |
// are deprecated and should go away. |
- DumpDeprecatedHistograms(frame->performance(), document_state, |
- data_reduction_proxy_was_used, |
- came_from_websearch, |
- websearch_chrome_joint_experiment_id, |
- is_preview, |
- scheme_type); |
+ DumpDeprecatedHistograms( |
+ frame->performance(), document_state, came_from_websearch, |
+ websearch_chrome_joint_experiment_id, is_preview, scheme_type); |
// Log the PLT to the info log. |
LogPageLoadTime(document_state, frame->dataSource()); |
// If persistent histograms are not enabled, initiate a PostTask here to be |
// sure that we send the histograms generated. Without this call, pages |
// that don't have an on-close-handler might generate data that is lost if |
// the renderer is shutdown abruptly (e.g. the user closed the tab). |
// TODO(bcwhite): Remove completely when persistence is on-by-default. |
if (!base::GlobalHistogramAllocator::Get()) { |