diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 19:10:00 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-30 19:10:00 +0000 |
commit | 36285b5f3edee76064a84423401e7e95e83d3f82 (patch) | |
tree | 3c3157ff1d8533724f38a543528d52fbab4f1f69 /chrome/renderer/render_view.cc | |
parent | f34c8c971723922b7b2a1e6c14c629dd1ef100b2 (diff) | |
download | chromium_src-36285b5f3edee76064a84423401e7e95e83d3f82.zip chromium_src-36285b5f3edee76064a84423401e7e95e83d3f82.tar.gz chromium_src-36285b5f3edee76064a84423401e7e95e83d3f82.tar.bz2 |
Use defensive code to assure that we do SDCH and DNS histograms in trial only
Part of tree fix. I temporarilly ifdef'ed the code to repair the tree.
This is a better fix.
r=davemoore
Review URL: http://codereview.chromium.org/151086
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19627 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_view.cc')
-rw-r--r-- | chrome/renderer/render_view.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 676fc69..f62e9a8 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -2903,21 +2903,21 @@ void RenderView::DumpLoadHistograms() const { finish - begin, kBeginToFinishMin, kBeginToFinishMax, kBeginToFinishBucketCount); -#if 0 - DCHECK(FieldTrialList::Find("DnsImpact") && - !FieldTrialList::Find("DnsImpact")->group_name().empty()); - UMA_HISTOGRAM_CUSTOM_TIMES( - FieldTrial::MakeName("Renderer4.BeginToFinish", "DnsImpact").data(), - finish - begin, kBeginToFinishMin, - kBeginToFinishMax, kBeginToFinishBucketCount); - - DCHECK(FieldTrialList::Find("GlobalSdch") && - !FieldTrialList::Find("GlobalSdch")->group_name().empty()); - UMA_HISTOGRAM_CUSTOM_TIMES( - FieldTrial::MakeName("Renderer4.BeginToFinish", "GlobalSdch").data(), - finish - begin, kBeginToFinishMin, - kBeginToFinishMax, kBeginToFinishBucketCount); -#endif // 0 + static bool use_dns_histogram(FieldTrialList::Find("DnsImpact") && + !FieldTrialList::Find("DnsImpact")->group_name().empty()); + if (use_dns_histogram) + UMA_HISTOGRAM_CUSTOM_TIMES( + FieldTrial::MakeName("Renderer4.BeginToFinish", "DnsImpact").data(), + finish - begin, kBeginToFinishMin, + kBeginToFinishMax, kBeginToFinishBucketCount); + + static bool use_sdch_histogram(FieldTrialList::Find("GlobalSdch") && + !FieldTrialList::Find("GlobalSdch")->group_name().empty()); + if (use_sdch_histogram) + UMA_HISTOGRAM_CUSTOM_TIMES( + FieldTrial::MakeName("Renderer4.BeginToFinish", "GlobalSdch").data(), + finish - begin, kBeginToFinishMin, + kBeginToFinishMax, kBeginToFinishBucketCount); UMA_HISTOGRAM_MEDIUM_TIMES("Renderer4.CommitToFinish", finish - commit); |