Chromium Code Reviews| Index: chrome/browser/about_flags.cc |
| diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc |
| index 22fe278c36f7baac34a39fc2173afaa636646eda..b774e7568f95d5833831ecc22b902788b48a3ff6 100644 |
| --- a/chrome/browser/about_flags.cc |
| +++ b/chrome/browser/about_flags.cc |
| @@ -86,6 +86,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) |
| @@ -326,7 +327,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) |
| }, |
| @@ -725,7 +726,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) |
| @@ -1008,28 +1009,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), |
| }, |
| { |
| @@ -1057,7 +1058,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), |
| }, |
| { |
| @@ -1498,6 +1499,10 @@ void GetSanitizedEnabledFlagsForCurrentPlatform( |
| for (size_t i = 0; i < num_experiments; ++i) { |
| if (experiments[i].supported_platforms & current_platform) |
| AddInternalName(experiments[i], &platform_experiments); |
| +#if defined(OS_CHROMEOS) |
| + if (experiments[i].supported_platforms & kOsCrOSOwnerOnly) |
| + AddInternalName(experiments[i], &platform_experiments); |
| +#endif |
| } |
| std::set<std::string> new_enabled_experiments; |
| @@ -1558,7 +1563,7 @@ void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line) { |
| FlagsState::GetInstance()->ConvertFlagsToSwitches(prefs, command_line); |
| } |
| -ListValue* GetFlagsExperimentsData(PrefService* prefs) { |
| +ListValue* GetFlagsExperimentsData(PrefService* prefs, FlagAccess access) { |
| std::set<std::string> enabled_experiments; |
| GetSanitizedEnabledFlags(prefs, &enabled_experiments); |
| @@ -1585,6 +1590,11 @@ ListValue* GetFlagsExperimentsData(PrefService* prefs) { |
| l10n_util::GetStringUTF16( |
| experiment.visible_description_id)); |
| bool supported = !!(experiment.supported_platforms & current_platform); |
| +#if defined(OS_CHROMEOS) |
| + if (access == kOwnerAccessToFlags && |
| + !!(experiment.supported_platforms & kOsCrOSOwnerOnly)) |
|
Nico
2013/04/16 21:40:24
nit: `!= 0` reads nicer than !! imo
pastarmovj
2013/04/17 16:03:22
Changed here and on 1592.
|
| + supported = true; |
| +#endif |
| data->SetBoolean("supported", supported); |
| ListValue* supported_platforms = new ListValue(); |