OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chrome_browser_field_trials_mobile.h" | 5 #include "chrome/browser/chrome_browser_field_trials_mobile.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 chrome::VersionInfo::GetChannel() == chrome::VersionInfo::CHANNEL_STABLE; | 37 chrome::VersionInfo::GetChannel() == chrome::VersionInfo::CHANNEL_STABLE; |
38 | 38 |
39 // Experiment enabled until Jan 1, 2015. By default, disabled. | 39 // Experiment enabled until Jan 1, 2015. By default, disabled. |
40 scoped_refptr<base::FieldTrial> trial( | 40 scoped_refptr<base::FieldTrial> trial( |
41 base::FieldTrialList::FactoryGetFieldTrial( | 41 base::FieldTrialList::FactoryGetFieldTrial( |
42 trial_name, | 42 trial_name, |
43 total_probability, | 43 total_probability, |
44 kDisabled, 2015, 1, 1, base::FieldTrial::ONE_TIME_RANDOMIZED, NULL)); | 44 kDisabled, 2015, 1, 1, base::FieldTrial::ONE_TIME_RANDOMIZED, NULL)); |
45 | 45 |
46 // Non-stable channels will run with probability 1. | 46 // Non-stable channels will run with probability 1. |
47 const int kEnabledGroup = trial->AppendGroup( | 47 trial->AppendGroup( |
48 kEnabled, | 48 kEnabled, |
49 kIsStableChannel ? enabled_group_probability : total_probability); | 49 kIsStableChannel ? enabled_group_probability : total_probability); |
50 | 50 |
51 const int v = trial->group(); | 51 trial->group(); |
52 VLOG(1) << trial_name << " enabled group id: " << kEnabledGroup | |
53 << ". Selected group id: " << v; | |
54 } | 52 } |
55 | 53 |
56 void DataCompressionProxyFieldTrials() { | 54 void SetupDataCompressionProxyFieldTrials() { |
57 // Governs the rollout of the compression proxy for Chrome on mobile | |
58 // platforms. In all channels, the percentage will be controlled from the | |
59 // server, and is configured to be 100% = 1000 / 1000 until overridden by the | |
60 // server. | |
61 DataCompressionProxyBaseFieldTrial( | |
62 "DataCompressionProxyRollout", 1000, 1000); | |
63 | |
64 // Governs the rollout of the _promo_ for the compression proxy | 55 // Governs the rollout of the _promo_ for the compression proxy |
65 // independently from the rollout of compression proxy. The enabled | 56 // independently from the rollout of compression proxy. The enabled |
66 // percentage is configured to be 10% = 100 / 1000 until overridden by the | 57 // percentage is configured to be 10% = 100 / 1000 until overridden by the |
67 // server. When this trial is "Enabled," users get a promo, whereas | 58 // server. When this trial is "Enabled," users get a promo, whereas |
68 // otherwise, compression is available without a promo. | 59 // otherwise, compression is available without a promo. |
69 DataCompressionProxyBaseFieldTrial( | 60 DataCompressionProxyBaseFieldTrial( |
70 "DataCompressionProxyPromoVisibility", 100, 1000); | 61 "DataCompressionProxyPromoVisibility", 100, 1000); |
71 } | 62 } |
72 | 63 |
73 } // namespace | 64 } // namespace |
74 | 65 |
75 void SetupMobileFieldTrials(const CommandLine& parsed_command_line) { | 66 void SetupMobileFieldTrials(const CommandLine& parsed_command_line) { |
76 DataCompressionProxyFieldTrials(); | 67 SetupDataCompressionProxyFieldTrials(); |
77 #if defined(OS_ANDROID) | 68 #if defined(OS_ANDROID) |
78 prerender::ConfigurePrerender(parsed_command_line); | 69 prerender::ConfigurePrerender(parsed_command_line); |
79 #endif | 70 #endif |
80 } | 71 } |
81 | 72 |
82 } // namespace chrome | 73 } // namespace chrome |
OLD | NEW |