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

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

Issue 2643753002: Add the suggestions UI in chrome (Closed)
Patch Set: Update comments Created 3 years, 10 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/app/strings/ios_strings.grd ('k') | ios/chrome/browser/chrome_switches.h » ('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 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 // Populate command line flag for the Rename "Save Image" to "Download Image" 251 // Populate command line flag for the Rename "Save Image" to "Download Image"
252 // experiment. 252 // experiment.
253 NSString* enableDownloadRenaming = 253 NSString* enableDownloadRenaming =
254 [defaults stringForKey:@"EnableDownloadRenaming"]; 254 [defaults stringForKey:@"EnableDownloadRenaming"];
255 if ([enableDownloadRenaming isEqualToString:@"Enabled"]) { 255 if ([enableDownloadRenaming isEqualToString:@"Enabled"]) {
256 command_line->AppendSwitch(switches::kEnableDownloadImageRenaming); 256 command_line->AppendSwitch(switches::kEnableDownloadImageRenaming);
257 } else if ([enableDownloadRenaming isEqualToString:@"Disabled"]) { 257 } else if ([enableDownloadRenaming isEqualToString:@"Disabled"]) {
258 command_line->AppendSwitch(switches::kDisableDownloadImageRenaming); 258 command_line->AppendSwitch(switches::kDisableDownloadImageRenaming);
259 } 259 }
260 260
261 // Populate command line flag for Suggestions UI display.
262 NSString* enableSuggestions = [defaults stringForKey:@"EnableSuggestions"];
263 if ([enableSuggestions isEqualToString:@"Enabled"]) {
264 command_line->AppendSwitch(switches::kEnableSuggestionsUI);
265 } else if ([enableSuggestions isEqualToString:@"Disabled"]) {
266 command_line->AppendSwitch(switches::kDisableSuggestionsUI);
267 }
268
261 // Freeform commandline flags. These are added last, so that any flags added 269 // Freeform commandline flags. These are added last, so that any flags added
262 // earlier in this function take precedence. 270 // earlier in this function take precedence.
263 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) { 271 if ([defaults boolForKey:@"EnableFreeformCommandLineFlags"]) {
264 base::CommandLine::StringVector flags; 272 base::CommandLine::StringVector flags;
265 // Append an empty "program" argument. 273 // Append an empty "program" argument.
266 flags.push_back(""); 274 flags.push_back("");
267 275
268 // The number of flags corresponds to the number of text fields in 276 // The number of flags corresponds to the number of text fields in
269 // Experimental.plist. 277 // Experimental.plist.
270 const int kNumFreeformFlags = 5; 278 const int kNumFreeformFlags = 5;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 } 351 }
344 352
345 namespace testing { 353 namespace testing {
346 354
347 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) { 355 const flags_ui::FeatureEntry* GetFeatureEntries(size_t* count) {
348 *count = arraysize(kFeatureEntries); 356 *count = arraysize(kFeatureEntries);
349 return kFeatureEntries; 357 return kFeatureEntries;
350 } 358 }
351 359
352 } // namespace testing 360 } // namespace testing
OLDNEW
« no previous file with comments | « ios/chrome/app/strings/ios_strings.grd ('k') | ios/chrome/browser/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698