Chromium Code Reviews| Index: ios/chrome/browser/experimental_flags.mm |
| diff --git a/ios/chrome/browser/experimental_flags.mm b/ios/chrome/browser/experimental_flags.mm |
| index 32bb7bb2a66f530ca03f3e855b1eccb91634cd61..cab0d186c7c7dddea0400e66fd28acf2a983b21a 100644 |
| --- a/ios/chrome/browser/experimental_flags.mm |
| +++ b/ios/chrome/browser/experimental_flags.mm |
| @@ -54,6 +54,23 @@ void SetWKWebViewTrialEligibility(bool eligible) { |
| : WKWebViewEligibility::INELIGIBLE; |
| } |
| +bool IsLRUSnapshotCacheEnabled() { |
| + return true; |
|
sdefresne
2015/11/03 16:58:08
I guess that this is debug code, can you remove?
jbbegue
2015/11/05 17:14:40
Done.
|
| + // Check if the experimental flag is forced on or off. |
| + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| + if (command_line->HasSwitch(switches::kEnableLRUSnapshotCache)) { |
| + return true; |
| + } else if (command_line->HasSwitch(switches::kDisableLRUSnapshotCache)) { |
| + return false; |
| + } |
| + |
| + // Check if the finch experiment is turned on. |
| + std::string group_name = |
| + base::FieldTrialList::FindFullName("IOSLRUSnapshotCache"); |
| + return base::StartsWith(group_name, "Enabled", |
| + base::CompareCase::INSENSITIVE_ASCII); |
| +} |
| + |
| bool IsWKWebViewEnabled() { |
| // If g_wkwebview_trial_eligibility hasn't been set, default it to |
| // ineligibile. This ensures future calls to try to set it will DCHECK. |