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

Side by Side Diff: chrome/browser/prerender/prerender_field_trial.cc

Issue 7599028: Prerender at 99%. This will be the default from now on. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 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 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/browser/prerender/prerender_field_trial.h" 5 #include "chrome/browser/prerender/prerender_field_trial.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 LOG(ERROR) << "Invalid --prerender option received on command line: " 44 LOG(ERROR) << "Invalid --prerender option received on command line: "
45 << switch_value; 45 << switch_value;
46 LOG(ERROR) << "Disabling prerendering!"; 46 LOG(ERROR) << "Disabling prerendering!";
47 } 47 }
48 } 48 }
49 49
50 switch (prerender_option) { 50 switch (prerender_option) {
51 case PRERENDER_OPTION_AUTO: { 51 case PRERENDER_OPTION_AUTO: {
52 const base::FieldTrial::Probability kPrefetchDivisor = 1000; 52 const base::FieldTrial::Probability kPrefetchDivisor = 1000;
53 const base::FieldTrial::Probability kYesPrefetchProbability = 0; 53 const base::FieldTrial::Probability kYesPrefetchProbability = 0;
54 const base::FieldTrial::Probability kPrerenderExp1Probability = 400; 54 const base::FieldTrial::Probability kPrerenderExp1Probability = 495;
55 const base::FieldTrial::Probability kPrerenderControl1Probability = 100; 55 const base::FieldTrial::Probability kPrerenderControl1Probability = 5;
56 const base::FieldTrial::Probability kPrerenderExp2Probability = 400; 56 const base::FieldTrial::Probability kPrerenderExp2Probability = 495;
57 const base::FieldTrial::Probability kPrerenderControl2Probability = 100; 57 const base::FieldTrial::Probability kPrerenderControl2Probability = 5;
58 58
59 scoped_refptr<base::FieldTrial> trial( 59 scoped_refptr<base::FieldTrial> trial(
60 new base::FieldTrial("Prefetch", kPrefetchDivisor, 60 new base::FieldTrial("Prefetch", kPrefetchDivisor,
61 "ContentPrefetchDisabled", 2012, 6, 30)); 61 "ContentPrefetchDisabled", 2012, 6, 30));
62 62
63 const int kNoPrefetchGroup = trial->kDefaultGroupNumber; 63 const int kNoPrefetchGroup = trial->kDefaultGroupNumber;
64 const int kYesPrefetchGroup = 64 const int kYesPrefetchGroup =
65 trial->AppendGroup("ContentPrefetchEnabled", kYesPrefetchProbability); 65 trial->AppendGroup("ContentPrefetchEnabled", kYesPrefetchProbability);
66 const int kPrerenderExperiment1Group = 66 const int kPrerenderExperiment1Group =
67 trial->AppendGroup("ContentPrefetchPrerender1", 67 trial->AppendGroup("ContentPrefetchPrerender1",
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 default: 113 default:
114 NOTREACHED(); 114 NOTREACHED();
115 } 115 }
116 116
117 UMA_HISTOGRAM_ENUMERATION("Prerender.Sessions", 117 UMA_HISTOGRAM_ENUMERATION("Prerender.Sessions",
118 PrerenderManager::GetMode(), 118 PrerenderManager::GetMode(),
119 PrerenderManager::PRERENDER_MODE_MAX); 119 PrerenderManager::PRERENDER_MODE_MAX);
120 } 120 }
121 121
122 } // namespace prerender 122 } // namespace prerender
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698