| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 return true; | 110 return true; |
| 111 } else if (command_line->HasSwitch(switches::kDisableAllBookmarksView)) { | 111 } else if (command_line->HasSwitch(switches::kDisableAllBookmarksView)) { |
| 112 return false; | 112 return false; |
| 113 } | 113 } |
| 114 | 114 |
| 115 // Check if the finch experiment exists. | 115 // Check if the finch experiment exists. |
| 116 std::string group_name = | 116 std::string group_name = |
| 117 base::FieldTrialList::FindFullName("RemoveAllBookmarks"); | 117 base::FieldTrialList::FindFullName("RemoveAllBookmarks"); |
| 118 | 118 |
| 119 if (group_name.empty()) { | 119 if (group_name.empty()) { |
| 120 return true; // If no finch experiment, keep all bookmarks enabled. | 120 return false; // If no finch experiment, all bookmarks is disabled. |
| 121 } | 121 } |
| 122 return base::StartsWith(group_name, "Enabled", | 122 return base::StartsWith(group_name, "Enabled", |
| 123 base::CompareCase::INSENSITIVE_ASCII); | 123 base::CompareCase::INSENSITIVE_ASCII); |
| 124 } | 124 } |
| 125 | 125 |
| 126 bool IsPhysicalWebEnabled() { | 126 bool IsPhysicalWebEnabled() { |
| 127 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 127 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 128 if (command_line->HasSwitch(switches::kEnableIOSPhysicalWeb)) { | 128 if (command_line->HasSwitch(switches::kEnableIOSPhysicalWeb)) { |
| 129 return true; | 129 return true; |
| 130 } else if (command_line->HasSwitch(switches::kDisableIOSPhysicalWeb)) { | 130 } else if (command_line->HasSwitch(switches::kDisableIOSPhysicalWeb)) { |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 } | 194 } |
| 195 | 195 |
| 196 // Check if the finch experiment is turned on. | 196 // Check if the finch experiment is turned on. |
| 197 std::string group_name = | 197 std::string group_name = |
| 198 base::FieldTrialList::FindFullName("SpotlightActionsEnabled"); | 198 base::FieldTrialList::FindFullName("SpotlightActionsEnabled"); |
| 199 return base::StartsWith(group_name, "Enabled", | 199 return base::StartsWith(group_name, "Enabled", |
| 200 base::CompareCase::INSENSITIVE_ASCII); | 200 base::CompareCase::INSENSITIVE_ASCII); |
| 201 } | 201 } |
| 202 | 202 |
| 203 } // namespace experimental_flags | 203 } // namespace experimental_flags |
| OLD | NEW |