| 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 } else if (parsed_command_line().HasSwitch(switches::kEnableNpn)) { | 772 } else if (parsed_command_line().HasSwitch(switches::kEnableNpn)) { |
| 773 net::HttpStreamFactory::EnableNpnSpdy(); | 773 net::HttpStreamFactory::EnableNpnSpdy(); |
| 774 use_field_trial = false; | 774 use_field_trial = false; |
| 775 } else if (parsed_command_line().HasSwitch(switches::kEnableNpnHttpOnly)) { | 775 } else if (parsed_command_line().HasSwitch(switches::kEnableNpnHttpOnly)) { |
| 776 net::HttpStreamFactory::EnableNpnHttpOnly(); | 776 net::HttpStreamFactory::EnableNpnHttpOnly(); |
| 777 use_field_trial = false; | 777 use_field_trial = false; |
| 778 } | 778 } |
| 779 if (use_field_trial) { | 779 if (use_field_trial) { |
| 780 const base::FieldTrial::Probability kSpdyDivisor = 100; | 780 const base::FieldTrial::Probability kSpdyDivisor = 100; |
| 781 base::FieldTrial::Probability npnhttp_probability = 5; | 781 base::FieldTrial::Probability npnhttp_probability = 5; |
| 782 base::FieldTrial::Probability spdy3_probability = 10; | 782 base::FieldTrial::Probability spdy3_probability = 50; |
| 783 | 783 |
| 784 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); | 784 chrome::VersionInfo::Channel channel = chrome::VersionInfo::GetChannel(); |
| 785 if (channel == chrome::VersionInfo::CHANNEL_CANARY || | 785 if (channel == chrome::VersionInfo::CHANNEL_CANARY || |
| 786 channel == chrome::VersionInfo::CHANNEL_UNKNOWN) { | 786 channel == chrome::VersionInfo::CHANNEL_UNKNOWN) { |
| 787 // 5% is for HTTP (no SPDY) and 5% for default SPDY (SPDY/2). | 787 // 5% is for HTTP (no SPDY) and 5% for default SPDY (SPDY/2). |
| 788 spdy3_probability = 90; | 788 spdy3_probability = 90; |
| 789 } | 789 } |
| 790 | 790 |
| 791 #if defined(OS_CHROMEOS) | 791 #if defined(OS_CHROMEOS) |
| 792 // Always enable SPDY (spdy/2 or spdy/3) on Chrome OS | 792 // Always enable SPDY (spdy/2 or spdy/3) on Chrome OS |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1968 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1968 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1969 uma_name += "_XP"; | 1969 uma_name += "_XP"; |
| 1970 | 1970 |
| 1971 uma_name += "_PreRead_"; | 1971 uma_name += "_PreRead_"; |
| 1972 uma_name += pre_read_percentage; | 1972 uma_name += pre_read_percentage; |
| 1973 AddPreReadHistogramTime(uma_name.c_str(), time); | 1973 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1974 } | 1974 } |
| 1975 #endif | 1975 #endif |
| 1976 #endif | 1976 #endif |
| 1977 } | 1977 } |
| OLD | NEW |