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 27 matching lines...) Expand all Loading... |
38 NSString* const kForceResetContextualSearch = @"ForceResetContextualSearch"; | 38 NSString* const kForceResetContextualSearch = @"ForceResetContextualSearch"; |
39 NSString* const kGaiaEnvironment = @"GAIAEnvironment"; | 39 NSString* const kGaiaEnvironment = @"GAIAEnvironment"; |
40 NSString* const kHeuristicsForPasswordGeneration = | 40 NSString* const kHeuristicsForPasswordGeneration = |
41 @"HeuristicsForPasswordGeneration"; | 41 @"HeuristicsForPasswordGeneration"; |
42 NSString* const kMDMIntegrationDisabled = @"MDMIntegrationDisabled"; | 42 NSString* const kMDMIntegrationDisabled = @"MDMIntegrationDisabled"; |
43 NSString* const kOriginServerHost = @"AlternateOriginServerHost"; | 43 NSString* const kOriginServerHost = @"AlternateOriginServerHost"; |
44 NSString* const kPendingIndexNavigationDisabled = | 44 NSString* const kPendingIndexNavigationDisabled = |
45 @"PendingIndexNavigationDisabled"; | 45 @"PendingIndexNavigationDisabled"; |
46 NSString* const kSafariVCSignInDisabled = @"SafariVCSignInDisabled"; | 46 NSString* const kSafariVCSignInDisabled = @"SafariVCSignInDisabled"; |
47 NSString* const kWhatsNewPromoStatus = @"WhatsNewPromoStatus"; | 47 NSString* const kWhatsNewPromoStatus = @"WhatsNewPromoStatus"; |
| 48 NSString* const kEnableSuggestions = @"EnableSuggestions"; |
48 | 49 |
49 const base::Feature kIOSDownloadImageRenaming{ | 50 const base::Feature kIOSDownloadImageRenaming{ |
50 "IOSDownloadImageRenaming", base::FEATURE_DISABLED_BY_DEFAULT}; | 51 "IOSDownloadImageRenaming", base::FEATURE_DISABLED_BY_DEFAULT}; |
51 | 52 |
52 } // namespace | 53 } // namespace |
53 | 54 |
54 namespace experimental_flags { | 55 namespace experimental_flags { |
55 | 56 |
56 bool AlwaysDisplayFirstRun() { | 57 bool AlwaysDisplayFirstRun() { |
57 return | 58 return |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 bool UseOnlyLocalHeuristicsForPasswordGeneration() { | 303 bool UseOnlyLocalHeuristicsForPasswordGeneration() { |
303 if ([[NSUserDefaults standardUserDefaults] | 304 if ([[NSUserDefaults standardUserDefaults] |
304 boolForKey:kHeuristicsForPasswordGeneration]) { | 305 boolForKey:kHeuristicsForPasswordGeneration]) { |
305 return true; | 306 return true; |
306 } | 307 } |
307 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 308 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
308 return command_line->HasSwitch( | 309 return command_line->HasSwitch( |
309 autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration); | 310 autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration); |
310 } | 311 } |
311 | 312 |
| 313 bool IsSuggestionsUIEnabled() { |
| 314 return [[NSUserDefaults standardUserDefaults] boolForKey:kEnableSuggestions]; |
| 315 } |
| 316 |
312 } // namespace experimental_flags | 317 } // namespace experimental_flags |
OLD | NEW |