Skip to content

Commit

Permalink
Neterror interstitials: Add switch for upcoming experiment
Browse files Browse the repository at this point in the history
Change-Id: I3f76e2ec46f199c1ce905f5a52de66ea67a23459
Reviewed-on: https://chromium-review.googlesource.com/1071516
Reviewed-by: Matt Menke <mmenke@chromium.org>
Commit-Queue: Edward Jung <edwardjung@chromium.org>
Cr-Commit-Position: refs/heads/master@{#561541}
  • Loading branch information
Edward Jung authored and Commit Bot committed May 24, 2018
1 parent 40614c0 commit 39bc8bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions chrome/browser/chrome_content_browser_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1843,6 +1843,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLineSwitches(

static const char* const kDinosaurEasterEggSwitches[] = {
error_page::switches::kDisableDinosaurEasterEgg,
error_page::switches::kEnableEasterEggBdayMode,
};
command_line->CopySwitchesFrom(browser_command_line,
kDinosaurEasterEggSwitches,
Expand Down
1 change: 1 addition & 0 deletions components/error_page/common/error_page_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace switches {

// Disables the dinosaur easter egg on the offline interstitial.
const char kDisableDinosaurEasterEgg[] = "disable-dinosaur-easter-egg";
const char kEnableEasterEggBdayMode[] = "enable-dino-easter-egg-bday-mode";

// Values for the kShowSavedCopy flag.
const char kDisableShowSavedCopy[] = "disable";
Expand Down
1 change: 1 addition & 0 deletions components/error_page/common/error_page_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ namespace switches {

extern const char kDisableDinosaurEasterEgg[];
extern const char kDisableShowSavedCopy[];
extern const char kEnableEasterEggBdayMode[];
extern const char kEnableShowSavedCopyPrimary[];
extern const char kEnableShowSavedCopySecondary[];
extern const char kShowSavedCopy[];
Expand Down
6 changes: 6 additions & 0 deletions components/error_page/common/localized_error.cc
Original file line number Diff line number Diff line change
Expand Up @@ -938,6 +938,12 @@ void LocalizedError::GetStrings(
l10n_util::GetStringUTF16(IDS_ERRORPAGE_FUN_DISABLED));
}

if (command_line->HasSwitch(error_page::switches::kEnableEasterEggBdayMode) ||
base::FieldTrialList::FindFullName("EnableEasterEggBdayMode") ==
"enabled") {
error_strings->SetBoolean("bdayMode", true);
}

summary->SetString("failedUrl", failed_url_string);
summary->SetString("hostName", host_name);

Expand Down

0 comments on commit 39bc8bc

Please sign in to comment.