OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser_main.h" | 5 #include "chrome/browser/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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 PostEarlyInitialization(); | 171 PostEarlyInitialization(); |
172 } | 172 } |
173 | 173 |
174 // This is an A/B test for the maximum number of persistent connections per | 174 // This is an A/B test for the maximum number of persistent connections per |
175 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari | 175 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari |
176 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to | 176 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to |
177 // run faster) uses 8. We would like to see how much of an effect this value has | 177 // run faster) uses 8. We would like to see how much of an effect this value has |
178 // on browsing. Too large a value might cause us to run into SYN flood detection | 178 // on browsing. Too large a value might cause us to run into SYN flood detection |
179 // mechanisms. | 179 // mechanisms. |
180 void BrowserMainParts::ConnectionFieldTrial() { | 180 void BrowserMainParts::ConnectionFieldTrial() { |
181 const FieldTrial::Probability kConnectDivisor = 100; | 181 const FieldTrial::Probability kConnectDivisor = 1000; |
182 const FieldTrial::Probability kConnectProbability = 20; // 20% probability | 182 const FieldTrial::Probability kConnectProbability = 20; // 2% probability |
183 | 183 |
184 scoped_refptr<FieldTrial> connect_trial = | 184 scoped_refptr<FieldTrial> connect_trial = |
185 new FieldTrial("ConnCountImpact", kConnectDivisor); | 185 new FieldTrial("ConnCountImpact", kConnectDivisor); |
186 | 186 |
187 const int connect_5 = connect_trial->AppendGroup("_conn_count_5", | 187 const int connect_5 = connect_trial->AppendGroup("_conn_count_5", |
188 kConnectProbability); | 188 kConnectProbability); |
189 const int connect_7 = connect_trial->AppendGroup("_conn_count_7", | 189 const int connect_7 = connect_trial->AppendGroup("_conn_count_7", |
190 kConnectProbability); | 190 kConnectProbability); |
191 const int connect_8 = connect_trial->AppendGroup("_conn_count_8", | 191 const int connect_8 = connect_trial->AppendGroup("_conn_count_8", |
192 kConnectProbability); | 192 kConnectProbability); |
(...skipping 22 matching lines...) Expand all Loading... |
215 NOTREACHED(); | 215 NOTREACHED(); |
216 } | 216 } |
217 } | 217 } |
218 | 218 |
219 // A/B test for determining a value for unused socket timeout. Currently the | 219 // A/B test for determining a value for unused socket timeout. Currently the |
220 // timeout defaults to 10 seconds. Having this value set too low won't allow us | 220 // timeout defaults to 10 seconds. Having this value set too low won't allow us |
221 // to take advantage of idle sockets. Setting it to too high could possibly | 221 // to take advantage of idle sockets. Setting it to too high could possibly |
222 // result in more ERR_CONNECT_RESETs, requiring one RTT to receive the RST | 222 // result in more ERR_CONNECT_RESETs, requiring one RTT to receive the RST |
223 // packet and possibly another RTT to re-establish the connection. | 223 // packet and possibly another RTT to re-establish the connection. |
224 void BrowserMainParts::SocketTimeoutFieldTrial() { | 224 void BrowserMainParts::SocketTimeoutFieldTrial() { |
225 const FieldTrial::Probability kIdleSocketTimeoutDivisor = 100; | 225 const FieldTrial::Probability kIdleSocketTimeoutDivisor = 1000; |
226 // 25% probability | 226 // 2.5% probability |
227 const FieldTrial::Probability kSocketTimeoutProbability = 25; | 227 const FieldTrial::Probability kSocketTimeoutProbability = 25; |
228 | 228 |
229 scoped_refptr<FieldTrial> socket_timeout_trial = | 229 scoped_refptr<FieldTrial> socket_timeout_trial = |
230 new FieldTrial("IdleSktToImpact", kIdleSocketTimeoutDivisor); | 230 new FieldTrial("IdleSktToImpact", kIdleSocketTimeoutDivisor); |
231 | 231 |
232 const int socket_timeout_5 = | 232 const int socket_timeout_5 = |
233 socket_timeout_trial->AppendGroup("_idle_timeout_5", | 233 socket_timeout_trial->AppendGroup("_idle_timeout_5", |
234 kSocketTimeoutProbability); | 234 kSocketTimeoutProbability); |
235 const int socket_timeout_20 = | 235 const int socket_timeout_20 = |
236 socket_timeout_trial->AppendGroup("_idle_timeout_20", | 236 socket_timeout_trial->AppendGroup("_idle_timeout_20", |
(...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 | 1314 |
1315 metrics->Stop(); | 1315 metrics->Stop(); |
1316 | 1316 |
1317 // browser_shutdown takes care of deleting browser_process, so we need to | 1317 // browser_shutdown takes care of deleting browser_process, so we need to |
1318 // release it. | 1318 // release it. |
1319 ignore_result(browser_process.release()); | 1319 ignore_result(browser_process.release()); |
1320 browser_shutdown::Shutdown(); | 1320 browser_shutdown::Shutdown(); |
1321 | 1321 |
1322 return result_code; | 1322 return result_code; |
1323 } | 1323 } |
OLD | NEW |