Index: chrome/browser/about_flags.cc |
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc |
index 67e566c1f68231220ac099c9c44ca421f8bd3cc2..827beff34b567f9e10c36b0aade20ac100d9e95e 100644 |
--- a/chrome/browser/about_flags.cc |
+++ b/chrome/browser/about_flags.cc |
@@ -85,6 +85,7 @@ void AddOsStrings(unsigned bitmask, ListValue* list) { |
{kOsLinux, "Linux"}, |
{kOsCrOS, "Chrome OS"}, |
{kOsAndroid, "Android"}, |
+ {kOsCrOSOwnerOnly, "Chrome OS (owner only)"}, |
}; |
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i) |
if (bitmask & kBitsToOs[i].bit) |
@@ -307,7 +308,7 @@ const Experiment kExperiments[] = { |
"threaded-compositing-mode", |
IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME, |
IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION, |
- kOsDesktop & ~kOsCrOS, |
+ kOsMac | kOsWin | kOsLinux, |
ENABLE_DISABLE_VALUE_TYPE(switches::kEnableThreadedCompositing, |
switches::kDisableThreadedCompositing) |
}, |
@@ -682,7 +683,7 @@ const Experiment kExperiments[] = { |
"enable-managed-users", |
IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME, |
IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION, |
- kOsAll, |
+ kOsMac | kOsWin | kOsLinux | kOsAndroid | kOsCrOSOwnerOnly, |
SINGLE_VALUE_TYPE(switches::kEnableManagedUsers) |
}, |
#if defined(USE_ASH) |
@@ -957,28 +958,28 @@ const Experiment kExperiments[] = { |
"disable-boot-animation", |
IDS_FLAGS_DISABLE_BOOT_ANIMATION, |
IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION, |
- kOsCrOS, |
+ kOsCrOSOwnerOnly, |
SINGLE_VALUE_TYPE(switches::kDisableBootAnimation), |
}, |
{ |
"disable-boot-animation2", |
IDS_FLAGS_DISABLE_BOOT_ANIMATION2, |
IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION, |
- kOsCrOS, |
+ kOsCrOSOwnerOnly, |
SINGLE_VALUE_TYPE(ash::switches::kAshDisableBootAnimation2), |
}, |
{ |
"boot-animation-fucntion", |
IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION, |
IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION, |
- kOsCrOS, |
+ kOsCrOSOwnerOnly, |
MULTI_VALUE_TYPE(kAshBootAnimationFunction), |
}, |
{ |
"captive-portal-detector", |
IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME, |
IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION, |
- kOsCrOS, |
+ kOsCrOSOwnerOnly, |
MULTI_VALUE_TYPE(kChromeCaptivePortalDetectionChoices), |
}, |
{ |
@@ -1006,7 +1007,7 @@ const Experiment kExperiments[] = { |
"disable-app-mode", |
IDS_FLAGS_DISABLE_KIOSK_APPS_NAME, |
IDS_FLAGS_DISABLE_KIOSK_APPS_DESCRIPTION, |
- kOsCrOS, |
+ kOsCrOSOwnerOnly, |
SINGLE_VALUE_TYPE(switches::kDisableAppMode), |
}, |
{ |
@@ -1406,7 +1407,7 @@ void GetSanitizedEnabledFlagsForCurrentPlatform( |
// don't remove these from prefs else syncing to a platform with a different |
// set of experiments would be lossy. |
std::set<std::string> platform_experiments; |
- int current_platform = GetCurrentPlatform(); |
+ int current_platform = GetCurrentPlatform(true); |
for (size_t i = 0; i < num_experiments; ++i) { |
if (experiments[i].supported_platforms & current_platform) |
AddInternalName(experiments[i], &platform_experiments); |
@@ -1470,11 +1471,11 @@ void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) { |
FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line); |
} |
-ListValue* GetFlagsExperimentsData(PrefService* prefs) { |
+ListValue* GetFlagsExperimentsData(PrefService* prefs, bool owner) { |
std::set<std::string> enabled_experiments; |
GetSanitizedEnabledFlags(prefs, &enabled_experiments); |
- int current_platform = GetCurrentPlatform(); |
+ int current_platform = GetCurrentPlatform(owner); |
ListValue* experiments_data = new ListValue(); |
for (size_t i = 0; i < num_experiments; ++i) { |
@@ -1540,13 +1541,13 @@ void ResetAllFlags(PrefService* prefs) { |
FlagsState::GetInstance()->ResetAllFlags(prefs); |
} |
-int GetCurrentPlatform() { |
+int GetCurrentPlatform(bool owner) { |
#if defined(OS_MACOSX) |
return kOsMac; |
#elif defined(OS_WIN) |
return kOsWin; |
#elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. |
- return kOsCrOS; |
+ return kOsCrOS | (owner ? kOsCrOSOwnerOnly : 0); |
#elif defined(OS_LINUX) || defined(OS_OPENBSD) |
return kOsLinux; |
#elif defined(OS_ANDROID) |