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

Side by Side Diff: chrome/browser/chrome_browser_field_trials.cc

Issue 10826284: Revert "TLS channel id field trial." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « chrome/browser/chrome_browser_field_trials.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | 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) 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"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 SpdyFieldTrial(); 117 SpdyFieldTrial();
118 ConnectBackupJobsFieldTrial(); 118 ConnectBackupJobsFieldTrial();
119 WarmConnectionFieldTrial(); 119 WarmConnectionFieldTrial();
120 PredictorFieldTrial(); 120 PredictorFieldTrial();
121 DefaultAppsFieldTrial(); 121 DefaultAppsFieldTrial();
122 AutoLaunchChromeFieldTrial(); 122 AutoLaunchChromeFieldTrial();
123 gpu_util::InitializeCompositingFieldTrial(); 123 gpu_util::InitializeCompositingFieldTrial();
124 SetupUniformityFieldTrials(); 124 SetupUniformityFieldTrials();
125 AutocompleteFieldTrial::Activate(); 125 AutocompleteFieldTrial::Activate();
126 DisableNewTabFieldTrialIfNecesssary(); 126 DisableNewTabFieldTrialIfNecesssary();
127 ChannelIDFieldTrial();
128 } 127 }
129 128
130 // This is an A/B test for the maximum number of persistent connections per 129 // This is an A/B test for the maximum number of persistent connections per
131 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari 130 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari
132 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to 131 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to
133 // run faster) uses 8. We would like to see how much of an effect this value has 132 // run faster) uses 8. We would like to see how much of an effect this value has
134 // on browsing. Too large a value might cause us to run into SYN flood detection 133 // on browsing. Too large a value might cause us to run into SYN flood detection
135 // mechanisms. 134 // mechanisms.
136 void ChromeBrowserFieldTrials::ConnectionFieldTrial() { 135 void ChromeBrowserFieldTrials::ConnectionFieldTrial() {
137 const base::FieldTrial::Probability kConnectDivisor = 100; 136 const base::FieldTrial::Probability kConnectDivisor = 100;
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 if (trial) { 575 if (trial) {
577 bool using_hidpi_assets = false; 576 bool using_hidpi_assets = false;
578 #if defined(ENABLE_HIDPI) && defined(OS_WIN) 577 #if defined(ENABLE_HIDPI) && defined(OS_WIN)
579 // Mirrors logic in resource_bundle_win.cc. 578 // Mirrors logic in resource_bundle_win.cc.
580 using_hidpi_assets = ui::GetDPIScale() > 1.5; 579 using_hidpi_assets = ui::GetDPIScale() > 1.5;
581 #endif 580 #endif
582 if (ui::GetDisplayLayout() != ui::LAYOUT_DESKTOP || using_hidpi_assets) 581 if (ui::GetDisplayLayout() != ui::LAYOUT_DESKTOP || using_hidpi_assets)
583 trial->Disable(); 582 trial->Disable();
584 } 583 }
585 } 584 }
586
587 void ChromeBrowserFieldTrials::ChannelIDFieldTrial() {
588 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel();
589 if (channel == chrome::VersionInfo::CHANNEL_CANARY) {
590 net::SSLConfigService::EnableChannelIDTrial();
591 } else if (channel == chrome::VersionInfo::CHANNEL_DEV &&
592 base::FieldTrialList::IsOneTimeRandomizationEnabled()) {
593 const base::FieldTrial::Probability kDivisor = 100;
594 // 10% probability of being in the enabled group.
595 const base::FieldTrial::Probability kEnableProbability = 10;
596 scoped_refptr<base::FieldTrial> trial =
597 base::FieldTrialList::FactoryGetFieldTrial(
598 "ChannelID", kDivisor, "disable", 2012, 8, 23, NULL);
599 trial->UseOneTimeRandomization();
600 int enable_group = trial->AppendGroup("enable", kEnableProbability);
601 if (trial->group() == enable_group)
602 net::SSLConfigService::EnableChannelIDTrial();
603 }
604 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_field_trials.h ('k') | chrome/browser/chrome_browser_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698