Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: ios/chrome/browser/experimental_flags.mm

Issue 2589763002: Enable the iPad Tab Switcher by default. (Closed)
Patch Set: Rebased. Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 bool IsSpotlightActionsEnabled() { 267 bool IsSpotlightActionsEnabled() {
268 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 268 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
269 return !command_line->HasSwitch(switches::kDisableSpotlightActions); 269 return !command_line->HasSwitch(switches::kDisableSpotlightActions);
270 } 270 }
271 271
272 bool IsStartupCrashEnabled() { 272 bool IsStartupCrashEnabled() {
273 return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableStartupCrash]; 273 return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableStartupCrash];
274 } 274 }
275 275
276 bool IsTabSwitcherEnabled() { 276 bool IsTabSwitcherEnabled() {
277 // Check if the experimental flag is forced on or off. 277 // Check if the experimental flag is forced off.
278 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 278 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
279 if (command_line->HasSwitch(switches::kEnableTabSwitcher)) { 279 if (command_line->HasSwitch(switches::kDisableTabSwitcher)) {
280 return true;
281 } else if (command_line->HasSwitch(switches::kDisableTabSwitcher)) {
282 return false; 280 return false;
283 } 281 }
284 282
285 // Check if the finch experiment is turned on. 283 // Check if the finch experiment is turned off.
286 std::string group_name = base::FieldTrialList::FindFullName("IOSTabSwitcher"); 284 std::string group_name = base::FieldTrialList::FindFullName("IOSTabSwitcher");
287 return base::StartsWith(group_name, "Enabled", 285 return !base::StartsWith(group_name, "Disabled",
288 base::CompareCase::INSENSITIVE_ASCII); 286 base::CompareCase::INSENSITIVE_ASCII);
289 } 287 }
290 288
291 bool IsViewCopyPasswordsEnabled() { 289 bool IsViewCopyPasswordsEnabled() {
292 NSString* viewCopyPasswordFlag = [[NSUserDefaults standardUserDefaults] 290 NSString* viewCopyPasswordFlag = [[NSUserDefaults standardUserDefaults]
293 objectForKey:kEnableViewCopyPasswords]; 291 objectForKey:kEnableViewCopyPasswords];
294 if ([viewCopyPasswordFlag isEqualToString:@"Enabled"]) 292 if ([viewCopyPasswordFlag isEqualToString:@"Enabled"])
295 return true; 293 return true;
296 return false; 294 return false;
297 } 295 }
298 296
299 bool UseOnlyLocalHeuristicsForPasswordGeneration() { 297 bool UseOnlyLocalHeuristicsForPasswordGeneration() {
300 if ([[NSUserDefaults standardUserDefaults] 298 if ([[NSUserDefaults standardUserDefaults]
301 boolForKey:kHeuristicsForPasswordGeneration]) { 299 boolForKey:kHeuristicsForPasswordGeneration]) {
302 return true; 300 return true;
303 } 301 }
304 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 302 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
305 return command_line->HasSwitch( 303 return command_line->HasSwitch(
306 autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration); 304 autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration);
307 } 305 }
308 306
309 } // namespace experimental_flags 307 } // namespace experimental_flags
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698