Commit cb482510 authored by Edward Jung's avatar Edward Jung Committed by Commit Bot

Switch to using features API instead of fieldTrialTests for enabling new

chrome://dino modes

Bug: 846473
Change-Id: I739b7e40e735da10cc7d7cd75cf808e770bf817e
Reviewed-on: https://chromium-review.googlesource.com/1100455
Commit-Queue: Edward Jung <edwardjung@chromium.org>
Reviewed-by: default avatarMatt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567331}
parent d3bda168
......@@ -6,6 +6,8 @@ static_library("common") {
sources = [
"error.cc",
"error.h",
"error_page_features.cc",
"error_page_features.h",
"error_page_params.cc",
"error_page_params.h",
"error_page_switches.cc",
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "components/error_page/common/error_page_features.h"
namespace error_page {
namespace features {
const base::Feature kDinoEasterEggBdayMode{"DinoEasterEggBdayMode",
base::FEATURE_DISABLED_BY_DEFAULT};
} // namespace features
} // namespace error_page
\ No newline at end of file
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef COMPONENTS_ERROR_PAGE_COMMON_ERROR_PAGE_FEATURES_H_
#define COMPONENTS_ERROR_PAGE_COMMON_ERROR_PAGE_FEATURES_H_
#include "base/feature_list.h"
namespace error_page {
namespace features {
// Defines all the features used by //components/error_page.
// Enables or disables the offline dino easter egg bday mode.
extern const base::Feature kDinoEasterEggBdayMode;
} // namespace features
} // namespace error_page
#endif // COMPONENTS_ERROR_PAGE_COMMON_ERROR_PAGE_FEATURES_H_
......@@ -22,6 +22,7 @@
#include "base/values.h"
#include "build/build_config.h"
#include "components/error_page/common/error.h"
#include "components/error_page/common/error_page_features.h"
#include "components/error_page/common/error_page_params.h"
#include "components/error_page/common/error_page_switches.h"
#include "components/error_page/common/net_error_info.h"
......@@ -939,8 +940,8 @@ void LocalizedError::GetStrings(
}
if (command_line->HasSwitch(error_page::switches::kEnableEasterEggBdayMode) ||
base::FieldTrialList::FindFullName("EnableEasterEggBdayMode") ==
"enabled") {
base::FeatureList::IsEnabled(
error_page::features::kDinoEasterEggBdayMode)) {
error_strings->SetBoolean("bdayMode", true);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment