| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 // This file can be empty. Its purpose is to contain the relatively short lived | 5 // This file can be empty. Its purpose is to contain the relatively short lived |
| 6 // definitions required for experimental flags. | 6 // definitions required for experimental flags. |
| 7 | 7 |
| 8 #include "ios/chrome/browser/experimental_flags.h" | 8 #include "ios/chrome/browser/experimental_flags.h" |
| 9 | 9 |
| 10 #include <dispatch/dispatch.h> | 10 #include <dispatch/dispatch.h> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 namespace { | 23 namespace { |
| 24 NSString* const kEnableAlertOnBackgroundUpload = | 24 NSString* const kEnableAlertOnBackgroundUpload = |
| 25 @"EnableAlertsOnBackgroundUpload"; | 25 @"EnableAlertsOnBackgroundUpload"; |
| 26 NSString* const kEnableViewCopyPasswords = @"EnableViewCopyPasswords"; | 26 NSString* const kEnableViewCopyPasswords = @"EnableViewCopyPasswords"; |
| 27 NSString* const kHeuristicsForPasswordGeneration = | 27 NSString* const kHeuristicsForPasswordGeneration = |
| 28 @"HeuristicsForPasswordGeneration"; | 28 @"HeuristicsForPasswordGeneration"; |
| 29 NSString* const kEnableReadingList = @"EnableReadingList"; | 29 NSString* const kEnableReadingList = @"EnableReadingList"; |
| 30 NSString* const kUpdatePasswordUIDisabled = @"UpdatePasswordUIDisabled"; | 30 NSString* const kUpdatePasswordUIDisabled = @"UpdatePasswordUIDisabled"; |
| 31 NSString* const kEnableNewClearBrowsingDataUI = @"EnableNewClearBrowsingDataUI"; | 31 NSString* const kEnableNewClearBrowsingDataUI = @"EnableNewClearBrowsingDataUI"; |
| 32 NSString* const kMDMIntegrationDisabled = @"MDMIntegrationDisabled"; |
| 32 } // namespace | 33 } // namespace |
| 33 | 34 |
| 34 namespace experimental_flags { | 35 namespace experimental_flags { |
| 35 | 36 |
| 36 bool IsAlertOnBackgroundUploadEnabled() { | 37 bool IsAlertOnBackgroundUploadEnabled() { |
| 37 return [[NSUserDefaults standardUserDefaults] | 38 return [[NSUserDefaults standardUserDefaults] |
| 38 boolForKey:kEnableAlertOnBackgroundUpload]; | 39 boolForKey:kEnableAlertOnBackgroundUpload]; |
| 39 } | 40 } |
| 40 | 41 |
| 41 bool IsLRUSnapshotCacheEnabled() { | 42 bool IsLRUSnapshotCacheEnabled() { |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // Check if the Finch experiment is turned on. | 174 // Check if the Finch experiment is turned on. |
| 174 return base::StartsWith(group_name, "Enabled", | 175 return base::StartsWith(group_name, "Enabled", |
| 175 base::CompareCase::INSENSITIVE_ASCII); | 176 base::CompareCase::INSENSITIVE_ASCII); |
| 176 } | 177 } |
| 177 | 178 |
| 178 bool IsSpotlightActionsEnabled() { | 179 bool IsSpotlightActionsEnabled() { |
| 179 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 180 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 180 return !command_line->HasSwitch(switches::kDisableSpotlightActions); | 181 return !command_line->HasSwitch(switches::kDisableSpotlightActions); |
| 181 } | 182 } |
| 182 | 183 |
| 184 bool IsMDMIntegrationEnabled() { |
| 185 return ![[NSUserDefaults standardUserDefaults] |
| 186 boolForKey:kMDMIntegrationDisabled]; |
| 187 } |
| 188 |
| 183 } // namespace experimental_flags | 189 } // namespace experimental_flags |
| OLD | NEW |