| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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.h" | 5 #include "chrome/browser/chrome_browser_field_trials.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" |
| 11 #include "base/string_number_conversions.h" | 11 #include "base/string_number_conversions.h" |
| 12 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 13 #include "base/stringprintf.h" | 13 #include "base/stringprintf.h" |
| 14 #include "base/sys_string_conversions.h" | 14 #include "base/sys_string_conversions.h" |
| 15 #include "base/utf_string_conversions.h" | 15 #include "base/utf_string_conversions.h" |
| 16 #include "chrome/browser/auto_launch_trial.h" | 16 #include "chrome/browser/auto_launch_trial.h" |
| 17 #include "chrome/browser/autocomplete/autocomplete_field_trial.h" | 17 #include "chrome/browser/autocomplete/autocomplete_field_trial.h" |
| 18 #include "chrome/browser/extensions/default_apps_trial.h" | 18 #include "chrome/browser/extensions/default_apps_trial.h" |
| 19 #include "chrome/browser/google/google_util.h" | 19 #include "chrome/browser/google/google_util.h" |
| 20 #include "chrome/browser/gpu_util.h" | 20 #include "chrome/browser/gpu_util.h" |
| 21 #include "chrome/browser/instant/instant_field_trials.h" | 21 #include "chrome/browser/instant/instant_field_trials.h" |
| 22 #include "chrome/browser/net/predictor.h" | 22 #include "chrome/browser/net/predictor.h" |
| 23 #include "chrome/browser/prerender/prerender_field_trial.h" | 23 #include "chrome/browser/prerender/prerender_field_trial.h" |
| 24 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 24 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
| 25 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
| 25 #include "chrome/common/chrome_switches.h" | 26 #include "chrome/common/chrome_switches.h" |
| 26 #include "chrome/common/chrome_version_info.h" | 27 #include "chrome/common/chrome_version_info.h" |
| 27 #include "chrome/common/metrics/variations/variations_util.h" | 28 #include "chrome/common/metrics/variations/variations_util.h" |
| 28 #include "net/http/http_stream_factory.h" | 29 #include "net/http/http_stream_factory.h" |
| 29 #include "net/socket/client_socket_pool_base.h" | 30 #include "net/socket/client_socket_pool_base.h" |
| 30 #include "net/socket/client_socket_pool_manager.h" | 31 #include "net/socket/client_socket_pool_manager.h" |
| 31 #include "net/spdy/spdy_session.h" | 32 #include "net/spdy/spdy_session.h" |
| 32 #include "net/spdy/spdy_session_pool.h" | 33 #include "net/spdy/spdy_session_pool.h" |
| 33 #include "ui/base/layout.h" | 34 #include "ui/base/layout.h" |
| 34 | 35 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 WarmConnectionFieldTrial(); | 122 WarmConnectionFieldTrial(); |
| 122 PredictorFieldTrial(); | 123 PredictorFieldTrial(); |
| 123 DefaultAppsFieldTrial(); | 124 DefaultAppsFieldTrial(); |
| 124 AutoLaunchChromeFieldTrial(); | 125 AutoLaunchChromeFieldTrial(); |
| 125 gpu_util::InitializeCompositingFieldTrial(); | 126 gpu_util::InitializeCompositingFieldTrial(); |
| 126 SetupUniformityFieldTrials(); | 127 SetupUniformityFieldTrials(); |
| 127 AutocompleteFieldTrial::Activate(); | 128 AutocompleteFieldTrial::Activate(); |
| 128 DisableNewTabFieldTrialIfNecesssary(); | 129 DisableNewTabFieldTrialIfNecesssary(); |
| 129 SetUpSafeBrowsingInterstitialFieldTrial(); | 130 SetUpSafeBrowsingInterstitialFieldTrial(); |
| 130 SetUpChannelIDFieldTrial(); | 131 SetUpChannelIDFieldTrial(); |
| 132 #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| 133 OneClickSigninHelper::InitializeFieldTrial(); |
| 134 #endif |
| 131 } | 135 } |
| 132 | 136 |
| 133 // This is an A/B test for the maximum number of persistent connections per | 137 // This is an A/B test for the maximum number of persistent connections per |
| 134 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari | 138 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari |
| 135 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to | 139 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to |
| 136 // run faster) uses 8. We would like to see how much of an effect this value has | 140 // run faster) uses 8. We would like to see how much of an effect this value has |
| 137 // on browsing. Too large a value might cause us to run into SYN flood detection | 141 // on browsing. Too large a value might cause us to run into SYN flood detection |
| 138 // mechanisms. | 142 // mechanisms. |
| 139 void ChromeBrowserFieldTrials::ConnectionFieldTrial() { | 143 void ChromeBrowserFieldTrials::ConnectionFieldTrial() { |
| 140 const base::FieldTrial::Probability kConnectDivisor = 100; | 144 const base::FieldTrial::Probability kConnectDivisor = 100; |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 552 const base::FieldTrial::Probability kEnableProbability = 10; | 556 const base::FieldTrial::Probability kEnableProbability = 10; |
| 553 scoped_refptr<base::FieldTrial> trial = | 557 scoped_refptr<base::FieldTrial> trial = |
| 554 base::FieldTrialList::FactoryGetFieldTrial( | 558 base::FieldTrialList::FactoryGetFieldTrial( |
| 555 "ChannelID", kDivisor, "disable", 2012, 11, 5, NULL); | 559 "ChannelID", kDivisor, "disable", 2012, 11, 5, NULL); |
| 556 trial->UseOneTimeRandomization(); | 560 trial->UseOneTimeRandomization(); |
| 557 int enable_group = trial->AppendGroup("enable", kEnableProbability); | 561 int enable_group = trial->AppendGroup("enable", kEnableProbability); |
| 558 if (trial->group() == enable_group) | 562 if (trial->group() == enable_group) |
| 559 net::SSLConfigService::EnableChannelIDTrial(); | 563 net::SSLConfigService::EnableChannelIDTrial(); |
| 560 } | 564 } |
| 561 } | 565 } |
| OLD | NEW |