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

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

Issue 2956013002: [ios] Workaround error affecting 3rd party keyboards and omnibox. (Closed)
Patch Set: Update comment Created 3 years, 5 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
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 26 matching lines...) Expand all
37 NSString* const kForceResetContextualSearch = @"ForceResetContextualSearch"; 37 NSString* const kForceResetContextualSearch = @"ForceResetContextualSearch";
38 NSString* const kGaiaEnvironment = @"GAIAEnvironment"; 38 NSString* const kGaiaEnvironment = @"GAIAEnvironment";
39 NSString* const kHeuristicsForPasswordGeneration = 39 NSString* const kHeuristicsForPasswordGeneration =
40 @"HeuristicsForPasswordGeneration"; 40 @"HeuristicsForPasswordGeneration";
41 NSString* const kMDMIntegrationDisabled = @"MDMIntegrationDisabled"; 41 NSString* const kMDMIntegrationDisabled = @"MDMIntegrationDisabled";
42 NSString* const kOriginServerHost = @"AlternateOriginServerHost"; 42 NSString* const kOriginServerHost = @"AlternateOriginServerHost";
43 NSString* const kSafariVCSignInDisabled = @"SafariVCSignInDisabled"; 43 NSString* const kSafariVCSignInDisabled = @"SafariVCSignInDisabled";
44 NSString* const kWhatsNewPromoStatus = @"WhatsNewPromoStatus"; 44 NSString* const kWhatsNewPromoStatus = @"WhatsNewPromoStatus";
45 const base::Feature kEnableSlimNavigationManager{ 45 const base::Feature kEnableSlimNavigationManager{
46 "EnableSlimNavigationManager", base::FEATURE_DISABLED_BY_DEFAULT}; 46 "EnableSlimNavigationManager", base::FEATURE_DISABLED_BY_DEFAULT};
47 const base::Feature kEnableThirdPartyKeyboardWorkaround{
48 "EnableThirdPartyKeyboardWorkaround", base::FEATURE_ENABLED_BY_DEFAULT};
47 49
48 } // namespace 50 } // namespace
49 51
50 namespace experimental_flags { 52 namespace experimental_flags {
51 53
52 bool AlwaysDisplayFirstRun() { 54 bool AlwaysDisplayFirstRun() {
53 return 55 return
54 [[NSUserDefaults standardUserDefaults] boolForKey:kFirstRunForceEnabled]; 56 [[NSUserDefaults standardUserDefaults] boolForKey:kFirstRunForceEnabled];
55 } 57 }
56 58
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 if (command_line->HasSwitch(switches::kEnableSlimNavigationManager)) { 299 if (command_line->HasSwitch(switches::kEnableSlimNavigationManager)) {
298 return true; 300 return true;
299 } else if (command_line->HasSwitch(switches::kDisableSlimNavigationManager)) { 301 } else if (command_line->HasSwitch(switches::kDisableSlimNavigationManager)) {
300 return false; 302 return false;
301 } 303 }
302 304
303 // Check if the Finch experiment is turned on. 305 // Check if the Finch experiment is turned on.
304 return base::FeatureList::IsEnabled(kEnableSlimNavigationManager); 306 return base::FeatureList::IsEnabled(kEnableSlimNavigationManager);
305 } 307 }
306 308
309 bool IsThirdPartyKeyboardWorkaroundEnabled() {
310 // Check if the experimental flag is forced on or off.
311 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
312 if (command_line->HasSwitch(switches::kEnableThirdPartyKeyboardWorkaround)) {
313 return true;
314 } else if (command_line->HasSwitch(
315 switches::kDisableThirdPartyKeyboardWorkaround)) {
316 return false;
317 }
318
319 // Check if the Finch experiment is turned on.
320 return base::FeatureList::IsEnabled(kEnableThirdPartyKeyboardWorkaround);
321 }
322
307 } // namespace experimental_flags 323 } // namespace experimental_flags
OLDNEW
« no previous file with comments | « ios/chrome/browser/experimental_flags.h ('k') | ios/chrome/browser/ui/omnibox/omnibox_text_field_ios.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698