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

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

Issue 2514333003: Componentize Reading List (Closed)
Patch Set: fix Created 4 years, 1 month 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } else if (command_line->HasSwitch(switches::kDisableTabSwitcher)) { 94 } else if (command_line->HasSwitch(switches::kDisableTabSwitcher)) {
95 return false; 95 return false;
96 } 96 }
97 97
98 // Check if the finch experiment is turned on. 98 // Check if the finch experiment is turned on.
99 std::string group_name = base::FieldTrialList::FindFullName("IOSTabSwitcher"); 99 std::string group_name = base::FieldTrialList::FindFullName("IOSTabSwitcher");
100 return base::StartsWith(group_name, "Enabled", 100 return base::StartsWith(group_name, "Enabled",
101 base::CompareCase::INSENSITIVE_ASCII); 101 base::CompareCase::INSENSITIVE_ASCII);
102 } 102 }
103 103
104 bool IsReadingListEnabled() {
105 // Check if the experimental flag is forced on or off.
106 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
107 if (command_line->HasSwitch(switches::kEnableReadingList)) {
108 return true;
109 }
110 return false;
111 }
112
113 bool IsAllBookmarksEnabled() { 104 bool IsAllBookmarksEnabled() {
114 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 105 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
115 if (command_line->HasSwitch(switches::kEnableAllBookmarksView)) { 106 if (command_line->HasSwitch(switches::kEnableAllBookmarksView)) {
116 return true; 107 return true;
117 } else if (command_line->HasSwitch(switches::kDisableAllBookmarksView)) { 108 } else if (command_line->HasSwitch(switches::kDisableAllBookmarksView)) {
118 return false; 109 return false;
119 } 110 }
120 111
121 // Check if the finch experiment exists. 112 // Check if the finch experiment exists.
122 std::string group_name = 113 std::string group_name =
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 return ![[NSUserDefaults standardUserDefaults] 176 return ![[NSUserDefaults standardUserDefaults]
186 boolForKey:kMDMIntegrationDisabled]; 177 boolForKey:kMDMIntegrationDisabled];
187 } 178 }
188 179
189 bool IsPendingIndexNavigationEnabled() { 180 bool IsPendingIndexNavigationEnabled() {
190 return [[NSUserDefaults standardUserDefaults] 181 return [[NSUserDefaults standardUserDefaults]
191 boolForKey:kPendingIndexNavigationEnabled]; 182 boolForKey:kPendingIndexNavigationEnabled];
192 } 183 }
193 184
194 } // namespace experimental_flags 185 } // namespace experimental_flags
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698