| Index: chrome/renderer/page_load_histograms.cc
|
| ===================================================================
|
| --- chrome/renderer/page_load_histograms.cc (revision 84367)
|
| +++ chrome/renderer/page_load_histograms.cc (working copy)
|
| @@ -270,8 +270,8 @@
|
| }
|
|
|
| // Histograms to determine if DNS prefetching has an impact on PLT.
|
| - static const bool use_dns_histogram =
|
| - base::FieldTrialList::TrialExists("DnsImpact");
|
| + static bool use_dns_histogram(base::FieldTrialList::Find("DnsImpact") &&
|
| + !base::FieldTrialList::Find("DnsImpact")->group_name().empty());
|
| if (use_dns_histogram) {
|
| UMA_HISTOGRAM_ENUMERATION(
|
| base::FieldTrial::MakeName("PLT.Abandoned", "DnsImpact"),
|
| @@ -307,7 +307,8 @@
|
|
|
| // Histograms to determine if content prefetching has an impact on PLT.
|
| static const bool prefetching_fieldtrial =
|
| - base::FieldTrialList::TrialExists("Prefetch");
|
| + base::FieldTrialList::Find("Prefetch") &&
|
| + !base::FieldTrialList::Find("Prefetch")->group_name().empty();
|
| if (prefetching_fieldtrial) {
|
| if (navigation_state->was_prefetcher()) {
|
| PLT_HISTOGRAM(base::FieldTrial::MakeName(
|
| @@ -337,8 +338,9 @@
|
| }
|
|
|
| // Histograms to determine if backup connection jobs have an impact on PLT.
|
| - static const bool connect_backup_jobs_fieldtrial =
|
| - base::FieldTrialList::TrialExists("ConnnectBackupJobs");
|
| + static const bool connect_backup_jobs_fieldtrial(
|
| + base::FieldTrialList::Find("ConnnectBackupJobs") &&
|
| + !base::FieldTrialList::Find("ConnnectBackupJobs")->group_name().empty());
|
| if (connect_backup_jobs_fieldtrial) {
|
| UMA_HISTOGRAM_ENUMERATION(
|
| base::FieldTrial::MakeName("PLT.Abandoned", "ConnnectBackupJobs"),
|
| @@ -376,8 +378,9 @@
|
| // impact on PLT.
|
| // TODO(jar): Consider removing the per-link-type versions. We
|
| // really only need LINK_LOAD_NORMAL and NORMAL_LOAD.
|
| - static const bool use_connection_impact_histogram =
|
| - base::FieldTrialList::TrialExists("ConnCountImpact");
|
| + static bool use_connection_impact_histogram(
|
| + base::FieldTrialList::Find("ConnCountImpact") &&
|
| + !base::FieldTrialList::Find("ConnCountImpact")->group_name().empty());
|
| if (use_connection_impact_histogram) {
|
| UMA_HISTOGRAM_ENUMERATION(
|
| base::FieldTrial::MakeName("PLT.Abandoned", "ConnCountImpact"),
|
| @@ -409,8 +412,9 @@
|
| }
|
|
|
| // Histograms to determine effect of idle socket timeout.
|
| - static const bool use_idle_socket_timeout_histogram =
|
| - base::FieldTrialList::TrialExists("IdleSktToImpact");
|
| + static bool use_idle_socket_timeout_histogram(
|
| + base::FieldTrialList::Find("IdleSktToImpact") &&
|
| + !base::FieldTrialList::Find("IdleSktToImpact")->group_name().empty());
|
| if (use_idle_socket_timeout_histogram) {
|
| UMA_HISTOGRAM_ENUMERATION(
|
| base::FieldTrial::MakeName("PLT.Abandoned", "IdleSktToImpact"),
|
| @@ -442,8 +446,10 @@
|
| }
|
|
|
| // Histograms to determine effect of number of connections per proxy.
|
| - static const bool use_proxy_connection_impact_histogram =
|
| - base::FieldTrialList::TrialExists("ProxyConnectionImpact");
|
| + static bool use_proxy_connection_impact_histogram(
|
| + base::FieldTrialList::Find("ProxyConnectionImpact") &&
|
| + !base::FieldTrialList::Find(
|
| + "ProxyConnectionImpact")->group_name().empty());
|
| if (use_proxy_connection_impact_histogram) {
|
| UMA_HISTOGRAM_ENUMERATION(
|
| base::FieldTrial::MakeName("PLT.Abandoned", "ProxyConnectionImpact"),
|
| @@ -476,8 +482,8 @@
|
|
|
| // Histograms to determine if SDCH has an impact.
|
| // TODO(jar): Consider removing per-link load types and the enumeration.
|
| - static const bool use_sdch_histogram =
|
| - base::FieldTrialList::TrialExists("GlobalSdch");
|
| + static bool use_sdch_histogram(base::FieldTrialList::Find("GlobalSdch") &&
|
| + !base::FieldTrialList::Find("GlobalSdch")->group_name().empty());
|
| if (use_sdch_histogram) {
|
| UMA_HISTOGRAM_ENUMERATION(
|
| base::FieldTrial::MakeName("PLT.LoadType", "GlobalSdch"),
|
| @@ -514,8 +520,8 @@
|
| }
|
|
|
| // Histograms to determine if cache size has an impact on PLT.
|
| - static const bool use_cache_histogram1 =
|
| - base::FieldTrialList::TrialExists("CacheSize");
|
| + static bool use_cache_histogram1(base::FieldTrialList::Find("CacheSize") &&
|
| + !base::FieldTrialList::Find("CacheSize")->group_name().empty());
|
| if (use_cache_histogram1 && NavigationState::LINK_LOAD_NORMAL <= load_type &&
|
| NavigationState::LINK_LOAD_CACHE_ONLY >= load_type) {
|
| // TODO(mbelshe): Do we really want BeginToFinishDoc here? It seems like
|
| @@ -525,8 +531,9 @@
|
| }
|
|
|
| // Histograms to determine if cache throttling has an impact on PLT.
|
| - static const bool use_cache_histogram2 =
|
| - base::FieldTrialList::TrialExists("CacheThrottle");
|
| + static bool use_cache_histogram2(
|
| + base::FieldTrialList::Find("CacheThrottle") &&
|
| + !base::FieldTrialList::Find("CacheThrottle")->group_name().empty());
|
| if (use_cache_histogram2) {
|
| UMA_HISTOGRAM_ENUMERATION(
|
| base::FieldTrial::MakeName("PLT.Abandoned", "CacheThrottle"),
|
| @@ -584,8 +591,8 @@
|
| // if we asked for a HTTP request, we got a HTTP request
|
| // Due to spdy version mismatches, it is possible that we ask for SPDY
|
| // but didn't get SPDY.
|
| - static const bool use_spdy_histogram =
|
| - base::FieldTrialList::TrialExists("SpdyImpact");
|
| + static bool use_spdy_histogram(base::FieldTrialList::Find("SpdyImpact") &&
|
| + !base::FieldTrialList::Find("SpdyImpact")->group_name().empty());
|
| if (use_spdy_histogram) {
|
| // We take extra effort to only compute these once.
|
| static bool in_spdy_trial = base::FieldTrialList::Find(
|
| @@ -742,8 +749,8 @@
|
| }
|
| }
|
|
|
| - static const bool false_start_trial =
|
| - base::FieldTrialList::TrialExists("SSLFalseStart");
|
| + static bool false_start_trial(base::FieldTrialList::Find("SSLFalseStart") &&
|
| + !base::FieldTrialList::Find("SSLFalseStart")->group_name().empty());
|
| if (false_start_trial) {
|
| if (scheme_type == URLPattern::SCHEME_HTTPS) {
|
| switch (load_type) {
|
|
|