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_main.h" | 5 #include "chrome/browser/chrome_browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 use_field_trial = false; | 752 use_field_trial = false; |
753 } else if (parsed_command_line().HasSwitch(switches::kEnableNpn)) { | 753 } else if (parsed_command_line().HasSwitch(switches::kEnableNpn)) { |
754 net::HttpStreamFactory::EnableNpnSpdy(); | 754 net::HttpStreamFactory::EnableNpnSpdy(); |
755 use_field_trial = false; | 755 use_field_trial = false; |
756 } else if (parsed_command_line().HasSwitch(switches::kEnableNpnHttpOnly)) { | 756 } else if (parsed_command_line().HasSwitch(switches::kEnableNpnHttpOnly)) { |
757 net::HttpStreamFactory::EnableNpnHttpOnly(); | 757 net::HttpStreamFactory::EnableNpnHttpOnly(); |
758 use_field_trial = false; | 758 use_field_trial = false; |
759 } | 759 } |
760 if (use_field_trial) { | 760 if (use_field_trial) { |
761 const base::FieldTrial::Probability kSpdyDivisor = 100; | 761 const base::FieldTrial::Probability kSpdyDivisor = 100; |
762 base::FieldTrial::Probability npnhttp_probability = 5; | 762 // Enable SPDY/3 for 95% of the users, HTTP (no SPDY) for 1% of the users |
763 // 5% is for HTTP (no SPDY) and 5% for default SPDY (SPDY/2). | 763 // and SPDY/2 for 4% of the users. |
764 base::FieldTrial::Probability spdy3_probability = 90; | 764 base::FieldTrial::Probability npnhttp_probability = 1; |
| 765 base::FieldTrial::Probability spdy3_probability = 95; |
765 | 766 |
766 #if defined(OS_CHROMEOS) | 767 #if defined(OS_CHROMEOS) |
767 // Always enable SPDY (spdy/2 or spdy/3) on Chrome OS | 768 // Always enable SPDY (spdy/2 or spdy/3) on Chrome OS |
768 npnhttp_probability = 0; | 769 npnhttp_probability = 0; |
769 #endif // !defined(OS_CHROMEOS) | 770 #endif // !defined(OS_CHROMEOS) |
770 | 771 |
771 // NPN with spdy support is the default. | 772 // NPN with spdy support is the default. |
772 int npn_spdy_grp = -1; | 773 int npn_spdy_grp = -1; |
773 | 774 |
774 // After June 30, 2013 builds, it will always be in default group. | 775 // After June 30, 2013 builds, it will always be in default group. |
(...skipping 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1993 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1994 if (base::win::GetVersion() <= base::win::VERSION_XP) |
1994 uma_name += "_XP"; | 1995 uma_name += "_XP"; |
1995 | 1996 |
1996 uma_name += "_PreRead_"; | 1997 uma_name += "_PreRead_"; |
1997 uma_name += pre_read_percentage; | 1998 uma_name += pre_read_percentage; |
1998 AddPreReadHistogramTime(uma_name.c_str(), time); | 1999 AddPreReadHistogramTime(uma_name.c_str(), time); |
1999 } | 2000 } |
2000 #endif | 2001 #endif |
2001 #endif | 2002 #endif |
2002 } | 2003 } |
OLD | NEW |