| 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/common/pepper_flash.h" | 5 #include "chrome/common/pepper_flash.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
| 11 #include "chrome/common/chrome_switches.h" | 11 #include "chrome/common/chrome_switches.h" |
| 12 #include "chrome/common/chrome_version_info.h" | 12 #include "chrome/common/chrome_version_info.h" |
| 13 | 13 |
| 14 #if defined(OS_WIN) | 14 #if defined(OS_WIN) |
| 15 #include "base/win/metro.h" | 15 #include "base/win/metro.h" |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 const char* const kFieldTrialName = "PepperFlash"; | 20 const char* const kFieldTrialName = "ApplyPepperFlash"; |
| 21 const char* const kDisableGroupName = "DisableByDefault"; | 21 const char* const kDisableGroupName = "DisableByDefault"; |
| 22 const char* const kEnableGroupName = "EnableByDefault"; | 22 const char* const kEnableGroupName = "EnableByDefault"; |
| 23 int g_disabled_group_number = -1; | 23 int g_disabled_group_number = -1; |
| 24 | 24 |
| 25 void ActivateFieldTrial() { | 25 void ActivateFieldTrial() { |
| 26 // The field trial will expire on Jan 1st, 2014. | 26 // The field trial will expire on Jan 1st, 2014. |
| 27 scoped_refptr<base::FieldTrial> trial( | 27 scoped_refptr<base::FieldTrial> trial( |
| 28 base::FieldTrialList::FactoryGetFieldTrial( | 28 base::FieldTrialList::FactoryGetFieldTrial( |
| 29 kFieldTrialName, 1000, kDisableGroupName, 2014, 1, 1, | 29 kFieldTrialName, 1000, kDisableGroupName, 2014, 1, 1, |
| 30 &g_disabled_group_number)); | 30 &g_disabled_group_number)); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 80 |
| 81 // For other Windows users, enable only for Dev users in a field trial. | 81 // For other Windows users, enable only for Dev users in a field trial. |
| 82 return channel == chrome::VersionInfo::CHANNEL_DEV && IsInFieldTrialGroup(); | 82 return channel == chrome::VersionInfo::CHANNEL_DEV && IsInFieldTrialGroup(); |
| 83 #elif defined(OS_LINUX) | 83 #elif defined(OS_LINUX) |
| 84 // For Linux, always try to use it (availability is checked elsewhere). | 84 // For Linux, always try to use it (availability is checked elsewhere). |
| 85 return true; | 85 return true; |
| 86 #else | 86 #else |
| 87 return false; | 87 return false; |
| 88 #endif | 88 #endif |
| 89 } | 89 } |
| OLD | NEW |