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

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

Issue 2182553002: Add other variations (with ids) for NTPSnippets to chrome://flags (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alexei's comment #5 + fix a bug Created 4 years, 4 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 | « ios/chrome/browser/about_flags.h ('k') | ios/chrome/browser/ios_chrome_main_parts.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 // Implementation of about_flags for iOS that sets flags based on experimental 5 // Implementation of about_flags for iOS that sets flags based on experimental
6 // settings. 6 // settings.
7 7
8 #include "ios/chrome/browser/about_flags.h" 8 #include "ios/chrome/browser/about_flags.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 } // namespace 253 } // namespace
254 254
255 void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage, 255 void ConvertFlagsToSwitches(flags_ui::FlagsStorage* flags_storage,
256 base::CommandLine* command_line) { 256 base::CommandLine* command_line) {
257 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches( 257 FlagsStateSingleton::GetFlagsState()->ConvertFlagsToSwitches(
258 flags_storage, command_line, flags_ui::kAddSentinels, 258 flags_storage, command_line, flags_ui::kAddSentinels,
259 switches::kEnableIOSFeatures, switches::kDisableIOSFeatures); 259 switches::kEnableIOSFeatures, switches::kDisableIOSFeatures);
260 AppendSwitchesFromExperimentalSettings(command_line); 260 AppendSwitchesFromExperimentalSettings(command_line);
261 } 261 }
262 262
263 std::vector<std::string> RegisterAllFeatureVariationParameters(
264 flags_ui::FlagsStorage* flags_storage,
265 base::FeatureList* feature_list) {
266 return FlagsStateSingleton::GetFlagsState()
267 ->RegisterAllFeatureVariationParameters(flags_storage, feature_list);
268 }
269
263 void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage, 270 void GetFlagFeatureEntries(flags_ui::FlagsStorage* flags_storage,
264 flags_ui::FlagAccess access, 271 flags_ui::FlagAccess access,
265 base::ListValue* supported_entries, 272 base::ListValue* supported_entries,
266 base::ListValue* unsupported_entries) { 273 base::ListValue* unsupported_entries) {
267 FlagsStateSingleton::GetFlagsState()->GetFlagFeatureEntries( 274 FlagsStateSingleton::GetFlagsState()->GetFlagFeatureEntries(
268 flags_storage, access, supported_entries, unsupported_entries, 275 flags_storage, access, supported_entries, unsupported_entries,
269 base::Bind(&SkipConditionalFeatureEntry)); 276 base::Bind(&SkipConditionalFeatureEntry));
270 } 277 }
271 278
272 void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage, 279 void SetFeatureEntryEnabled(flags_ui::FlagsStorage* flags_storage,
273 const std::string& internal_name, 280 const std::string& internal_name,
274 bool enable) { 281 bool enable) {
275 FlagsStateSingleton::GetFlagsState()->SetFeatureEntryEnabled( 282 FlagsStateSingleton::GetFlagsState()->SetFeatureEntryEnabled(
276 flags_storage, internal_name, enable); 283 flags_storage, internal_name, enable);
277 } 284 }
278 285
279 void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) { 286 void ResetAllFlags(flags_ui::FlagsStorage* flags_storage) {
280 FlagsStateSingleton::GetFlagsState()->ResetAllFlags(flags_storage); 287 FlagsStateSingleton::GetFlagsState()->ResetAllFlags(flags_storage);
281 } 288 }
282 289
283 namespace testing { 290 namespace testing {
284 291
285 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { 292 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) {
286 *count = arraysize(kFeatureEntries); 293 *count = arraysize(kFeatureEntries);
287 return kFeatureEntries; 294 return kFeatureEntries;
288 } 295 }
289 296
290 } // namespace testing 297 } // namespace testing
OLDNEW
« no previous file with comments | « ios/chrome/browser/about_flags.h ('k') | ios/chrome/browser/ios_chrome_main_parts.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698