| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_field_trials_desktop.h" | 5 #include "chrome/browser/chrome_browser_field_trials_desktop.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "apps/field_trial_names.h" | 9 #include "apps/field_trial_names.h" |
| 10 #include "apps/pref_names.h" | 10 #include "apps/pref_names.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
| 13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
| 14 #include "base/strings/string_util.h" | 14 #include "base/strings/string_util.h" |
| 15 #include "chrome/browser/auto_launch_trial.h" | 15 #include "chrome/browser/auto_launch_trial.h" |
| 16 #include "chrome/browser/google/google_util.h" | 16 #include "chrome/browser/google/google_util.h" |
| 17 #include "chrome/browser/gpu/chrome_gpu_util.h" | 17 #include "chrome/browser/gpu/chrome_gpu_util.h" |
| 18 #include "chrome/browser/omnibox/omnibox_field_trial.h" | 18 #include "chrome/browser/omnibox/omnibox_field_trial.h" |
| 19 #include "chrome/browser/prerender/prerender_field_trial.h" | 19 #include "chrome/browser/prerender/prerender_field_trial.h" |
| 20 #include "chrome/browser/profiles/profile_manager.h" | 20 #include "chrome/browser/profiles/profiles_state.h" |
| 21 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" | 21 #include "chrome/browser/safe_browsing/safe_browsing_blocking_page.h" |
| 22 #include "chrome/browser/ui/sync/one_click_signin_helper.h" | 22 #include "chrome/browser/ui/sync/one_click_signin_helper.h" |
| 23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/common/chrome_version_info.h" | 24 #include "chrome/common/chrome_version_info.h" |
| 25 #include "chrome/common/metrics/variations/variations_util.h" | 25 #include "chrome/common/metrics/variations/variations_util.h" |
| 26 #include "content/public/common/content_constants.h" | 26 #include "content/public/common/content_constants.h" |
| 27 #include "net/spdy/spdy_session.h" | 27 #include "net/spdy/spdy_session.h" |
| 28 #include "ui/base/layout.h" | 28 #include "ui/base/layout.h" |
| 29 | 29 |
| 30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 71 |
| 72 void DisableShowProfileSwitcherTrialIfNecessary() { | 72 void DisableShowProfileSwitcherTrialIfNecessary() { |
| 73 // This trial is created by the VariationsService, but it needs to be disabled | 73 // This trial is created by the VariationsService, but it needs to be disabled |
| 74 // if multi-profiles isn't enabled or if browser frame avatar menu is | 74 // if multi-profiles isn't enabled or if browser frame avatar menu is |
| 75 // always hidden (Chrome OS). | 75 // always hidden (Chrome OS). |
| 76 bool avatar_menu_always_hidden = false; | 76 bool avatar_menu_always_hidden = false; |
| 77 #if defined(OS_CHROMEOS) | 77 #if defined(OS_CHROMEOS) |
| 78 avatar_menu_always_hidden = true; | 78 avatar_menu_always_hidden = true; |
| 79 #endif | 79 #endif |
| 80 base::FieldTrial* trial = base::FieldTrialList::Find("ShowProfileSwitcher"); | 80 base::FieldTrial* trial = base::FieldTrialList::Find("ShowProfileSwitcher"); |
| 81 if (trial && (!ProfileManager::IsMultipleProfilesEnabled() || | 81 if (trial && (!profiles::IsMultipleProfilesEnabled() || |
| 82 avatar_menu_always_hidden)) { | 82 avatar_menu_always_hidden)) { |
| 83 trial->Disable(); | 83 trial->Disable(); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| 87 void SetupCacheSensitivityAnalysisFieldTrial() { | 87 void SetupCacheSensitivityAnalysisFieldTrial() { |
| 88 const base::FieldTrial::Probability kDivisor = 100; | 88 const base::FieldTrial::Probability kDivisor = 100; |
| 89 | 89 |
| 90 base::FieldTrial::Probability sensitivity_analysis_probability = 0; | 90 base::FieldTrial::Probability sensitivity_analysis_probability = 0; |
| 91 | 91 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 OmniboxFieldTrial::ActivateStaticTrials(); | 164 OmniboxFieldTrial::ActivateStaticTrials(); |
| 165 SetupInfiniteCacheFieldTrial(); | 165 SetupInfiniteCacheFieldTrial(); |
| 166 SetupCacheSensitivityAnalysisFieldTrial(); | 166 SetupCacheSensitivityAnalysisFieldTrial(); |
| 167 DisableShowProfileSwitcherTrialIfNecessary(); | 167 DisableShowProfileSwitcherTrialIfNecessary(); |
| 168 WindowsOverlappedTCPReadsFieldTrial(parsed_command_line); | 168 WindowsOverlappedTCPReadsFieldTrial(parsed_command_line); |
| 169 SetupAppLauncherFieldTrial(local_state); | 169 SetupAppLauncherFieldTrial(local_state); |
| 170 SetupLowLatencyFlashAudioFieldTrial(); | 170 SetupLowLatencyFlashAudioFieldTrial(); |
| 171 } | 171 } |
| 172 | 172 |
| 173 } // namespace chrome | 173 } // namespace chrome |
| OLD | NEW |