Skip to content

Commit

Permalink
Provide a user default/command line flag conversion for popular sites.
Browse files Browse the repository at this point in the history
BUG=None

Review-Url: https://codereview.chromium.org/2409163003
Cr-Commit-Position: refs/heads/master@{#427385}
  • Loading branch information
e-noyau authored and Commit bot committed Oct 25, 2016
1 parent 64afdcd commit 4cfb133
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ios/chrome/browser/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -751,6 +751,7 @@ source_set("about_flags") {
"//components/dom_distiller/core",
"//components/flags_ui",
"//components/flags_ui:switches",
"//components/ntp_tiles",
"//components/strings",
"//components/sync",
"//components/variations",
Expand Down
1 change: 1 addition & 0 deletions ios/chrome/browser/DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ include_rules = [
"+components/language_usage_metrics",
"+components/leveldb_proto",
"+components/metrics",
"+components/ntp_tiles",
"+components/user_prefs",
"+components/metrics_services_manager",
"+components/navigation_metrics",
Expand Down
5 changes: 5 additions & 0 deletions ios/chrome/browser/about_flags.mm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "components/flags_ui/feature_entry_macros.h"
#include "components/flags_ui/flags_storage.h"
#include "components/flags_ui/flags_ui_switches.h"
#include "components/ntp_tiles/switches.h"
#include "components/strings/grit/components_strings.h"
#include "components/sync/driver/sync_driver_switches.h"
#include "google_apis/gaia/gaia_switches.h"
Expand Down Expand Up @@ -185,6 +186,10 @@ void AppendSwitchesFromExperimentalSettings(base::CommandLine* command_line) {
}
}

if ([defaults boolForKey:@"EnablePopularSites"]) {
command_line->AppendSwitch(ntp_tiles::switches::kEnableNTPPopularSites);
}

// Set the UA flag if UseMobileSafariUA is enabled.
if ([defaults boolForKey:@"UseMobileSafariUA"]) {
// Safari uses "Vesion/", followed by the OS version excluding bugfix, where
Expand Down

0 comments on commit 4cfb133

Please sign in to comment.