diff options
author | lzheng@chromium.org <lzheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 17:35:25 +0000 |
---|---|---|
committer | lzheng@chromium.org <lzheng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-27 17:35:25 +0000 |
commit | 9ea4fca41f2440a48006be192579de041a9f2b0f (patch) | |
tree | 2cef048c43ad365a00709fb68f4ad7b4770de623 /chrome/browser/browser_main.cc | |
parent | 97a97e3129993ebc31f77b54f9367b055458f4e2 (diff) | |
download | chromium_src-9ea4fca41f2440a48006be192579de041a9f2b0f.zip chromium_src-9ea4fca41f2440a48006be192579de041a9f2b0f.tar.gz chromium_src-9ea4fca41f2440a48006be192579de041a9f2b0f.tar.bz2 |
Enable the spdy A/B test for SxS installations. npn_with_http and npn_with_spdy
will be enabled at 50% of chance.
BUG=45022
TEST=Use command-line flag --chrome-sxs to force the browser as SxS, go to gmail.com,
login/logout, check about:histograms, you should see xx_spdytrial_xxx histograms.
Review URL: http://codereview.chromium.org/2188001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48404 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_main.cc')
-rw-r--r-- | chrome/browser/browser_main.cc | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/chrome/browser/browser_main.cc b/chrome/browser/browser_main.cc index 9c109cb..df15582 100644 --- a/chrome/browser/browser_main.cc +++ b/chrome/browser/browser_main.cc @@ -124,6 +124,8 @@ #include "chrome/browser/views/user_data_dir_dialog.h" #include "chrome/common/env_vars.h" #include "chrome/common/sandbox_policy.h" +#include "chrome/installer/util/browser_distribution.h" +#include "chrome/installer/util/google_chrome_sxs_distribution.h" #include "chrome/installer/util/helper.h" #include "chrome/installer/util/install_util.h" #include "chrome/installer/util/shell_util.h" @@ -724,16 +726,25 @@ int BrowserMain(const MainFunctionParams& parameters) { // TODO(lzheng): Increase these values to enable more spdy tests. // To enable 100% npn_with_spdy, set kNpnHttpProbability = 0 and set // kNpnSpdyProbability = FieldTrial::kAllRemainingProbability. - const FieldTrial::Probability kNpnHttpProbability = 0; // 0.0% - const FieldTrial::Probability kNpnSpdyProbability = 0; // 0.0% + FieldTrial::Probability npnhttp_probability = 0; // 0.0% + FieldTrial::Probability npnspdy_probability = 0; // 0.0% +#if defined(OS_WIN) + // Enable the A/B test for SxS. SxS is only available on windows + std::wstring channel; + if (BrowserDistribution::GetDistribution()->GetChromeChannel(&channel) && + channel == GoogleChromeSxSDistribution::ChannelName()) { + npnhttp_probability = 500; + npnspdy_probability = 500; + } +#endif scoped_refptr<FieldTrial> trial = new FieldTrial("SpdyImpact", kSpdyDivisor); // npn with only http support, no spdy. int npn_http_grp = - trial->AppendGroup("_npn_with_http", kNpnHttpProbability); + trial->AppendGroup("_npn_with_http", npnhttp_probability); // npn with spdy support. int npn_spdy_grp = - trial->AppendGroup("_npn_with_spdy", kNpnSpdyProbability); + trial->AppendGroup("_npn_with_spdy", npnspdy_probability); int trial_grp = trial->group(); if (trial_grp == npn_http_grp) { is_spdy_trial = true; |