| 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 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 | 626 |
| 627 SetupFieldTrials(metrics->recording_active(), | 627 SetupFieldTrials(metrics->recording_active(), |
| 628 local_state_->IsManagedPreference( | 628 local_state_->IsManagedPreference( |
| 629 prefs::kMaxConnectionsPerProxy)); | 629 prefs::kMaxConnectionsPerProxy)); |
| 630 | 630 |
| 631 // Initialize FieldTrialSynchronizer system. This is a singleton and is used | 631 // Initialize FieldTrialSynchronizer system. This is a singleton and is used |
| 632 // for posting tasks via base::Bind. Its deleted when it goes out of scope. | 632 // for posting tasks via base::Bind. Its deleted when it goes out of scope. |
| 633 // Even though base::Bind does AddRef and Release, the object will not be | 633 // Even though base::Bind does AddRef and Release, the object will not be |
| 634 // deleted after the Task is executed. | 634 // deleted after the Task is executed. |
| 635 field_trial_synchronizer_ = new FieldTrialSynchronizer(); | 635 field_trial_synchronizer_ = new FieldTrialSynchronizer(); |
| 636 field_trial_synchronizer_->Init(); |
| 636 } | 637 } |
| 637 | 638 |
| 638 // This is an A/B test for the maximum number of persistent connections per | 639 // This is an A/B test for the maximum number of persistent connections per |
| 639 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari | 640 // host. Currently Chrome, Firefox, and IE8 have this value set at 6. Safari |
| 640 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to | 641 // uses 4, and Fasterfox (a plugin for Firefox that supposedly configures it to |
| 641 // run faster) uses 8. We would like to see how much of an effect this value has | 642 // run faster) uses 8. We would like to see how much of an effect this value has |
| 642 // on browsing. Too large a value might cause us to run into SYN flood detection | 643 // on browsing. Too large a value might cause us to run into SYN flood detection |
| 643 // mechanisms. | 644 // mechanisms. |
| 644 void ChromeBrowserMainParts::ConnectionFieldTrial() { | 645 void ChromeBrowserMainParts::ConnectionFieldTrial() { |
| 645 const base::FieldTrial::Probability kConnectDivisor = 100; | 646 const base::FieldTrial::Probability kConnectDivisor = 100; |
| (...skipping 1325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1971 if (base::win::GetVersion() <= base::win::VERSION_XP) | 1972 if (base::win::GetVersion() <= base::win::VERSION_XP) |
| 1972 uma_name += "_XP"; | 1973 uma_name += "_XP"; |
| 1973 | 1974 |
| 1974 uma_name += "_PreRead_"; | 1975 uma_name += "_PreRead_"; |
| 1975 uma_name += pre_read_percentage; | 1976 uma_name += pre_read_percentage; |
| 1976 AddPreReadHistogramTime(uma_name.c_str(), time); | 1977 AddPreReadHistogramTime(uma_name.c_str(), time); |
| 1977 } | 1978 } |
| 1978 #endif | 1979 #endif |
| 1979 #endif | 1980 #endif |
| 1980 } | 1981 } |
| OLD | NEW |