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

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

Issue 2751793002: Cleaned up old navigation code that did not use pending navigation item. (Closed)
Patch Set: Moar DCHECKs Created 3 years, 9 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 23 matching lines...) Expand all
34 NSString* const kEnableStartupCrash = @"EnableStartupCrash"; 34 NSString* const kEnableStartupCrash = @"EnableStartupCrash";
35 NSString* const kEnableViewCopyPasswords = @"EnableViewCopyPasswords"; 35 NSString* const kEnableViewCopyPasswords = @"EnableViewCopyPasswords";
36 NSString* const kExternalAppPromptDisabled = @"ExternalAppPromptDisabled"; 36 NSString* const kExternalAppPromptDisabled = @"ExternalAppPromptDisabled";
37 NSString* const kFirstRunForceEnabled = @"FirstRunForceEnabled"; 37 NSString* const kFirstRunForceEnabled = @"FirstRunForceEnabled";
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 =
45 @"PendingIndexNavigationDisabled";
46 NSString* const kSafariVCSignInDisabled = @"SafariVCSignInDisabled"; 44 NSString* const kSafariVCSignInDisabled = @"SafariVCSignInDisabled";
47 NSString* const kWhatsNewPromoStatus = @"WhatsNewPromoStatus"; 45 NSString* const kWhatsNewPromoStatus = @"WhatsNewPromoStatus";
48 46
49 const base::Feature kIOSDownloadImageRenaming{ 47 const base::Feature kIOSDownloadImageRenaming{
50 "IOSDownloadImageRenaming", base::FEATURE_DISABLED_BY_DEFAULT}; 48 "IOSDownloadImageRenaming", base::FEATURE_DISABLED_BY_DEFAULT};
51 49
52 } // namespace 50 } // namespace
53 51
54 namespace experimental_flags { 52 namespace experimental_flags {
55 53
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 return true; 192 return true;
195 } else if (command_line->HasSwitch(switches::kDisablePaymentRequest)) { 193 } else if (command_line->HasSwitch(switches::kDisablePaymentRequest)) {
196 return false; 194 return false;
197 } 195 }
198 196
199 // Check if the Finch experiment is turned on. 197 // Check if the Finch experiment is turned on.
200 return base::StartsWith(group_name, "Enabled", 198 return base::StartsWith(group_name, "Enabled",
201 base::CompareCase::INSENSITIVE_ASCII); 199 base::CompareCase::INSENSITIVE_ASCII);
202 } 200 }
203 201
204 bool IsPendingIndexNavigationEnabled() {
205 return ![[NSUserDefaults standardUserDefaults]
206 boolForKey:kPendingIndexNavigationDisabled];
207 }
208
209 bool IsPhysicalWebEnabled() { 202 bool IsPhysicalWebEnabled() {
210 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 203 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
211 if (command_line->HasSwitch(switches::kEnableIOSPhysicalWeb)) { 204 if (command_line->HasSwitch(switches::kEnableIOSPhysicalWeb)) {
212 return true; 205 return true;
213 } else if (command_line->HasSwitch(switches::kDisableIOSPhysicalWeb)) { 206 } else if (command_line->HasSwitch(switches::kDisableIOSPhysicalWeb)) {
214 return false; 207 return false;
215 } 208 }
216 209
217 // Check if the finch experiment is turned on 210 // Check if the finch experiment is turned on
218 std::string group_name = 211 std::string group_name =
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return true; 262 return true;
270 263
271 if (command_line->HasSwitch(switches::kDisableSuggestionsUI)) 264 if (command_line->HasSwitch(switches::kDisableSuggestionsUI))
272 return false; 265 return false;
273 266
274 // By default, disable it. 267 // By default, disable it.
275 return false; 268 return false;
276 } 269 }
277 270
278 } // namespace experimental_flags 271 } // namespace experimental_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698