• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "chrome/browser/prerender/prerender_final_status.h"
6 
7 #include "base/metrics/histogram.h"
8 
9 namespace prerender {
10 
RecordFinalStatus(FinalStatus final_status)11 void RecordFinalStatus(FinalStatus final_status) {
12   DCHECK(final_status != FINAL_STATUS_MAX);
13   // FINAL_STATUS_CONTROL_GROUP indicates that the PrerenderContents
14   // was created only to measure "would-have-been-prerendered" for
15   // control group measurements. Don't pollute data with it.
16   if (final_status == FINAL_STATUS_CONTROL_GROUP)
17     return;
18   UMA_HISTOGRAM_ENUMERATION("Prerender.FinalStatus",
19                             final_status,
20                             FINAL_STATUS_MAX);
21 }
22 
23 }  // namespace prerender
24