Commit 6788e47a authored by Tommy Steimel's avatar Tommy Steimel Committed by Commit Bot

Revert "Show Variations info in cmd format in about:version."

This reverts commit 5b240cfb.

Reason for revert: breaking tests on iOS bot:

https://ci.chromium.org/buildbot/chromium.mac/ios-simulator-full-configs/2677

VisibleURLTestCase/testDoubleForwardNavigationToWebUIPage:
[0201/113634.854499:FATAL:template_expressions.cc(97)] Check failed: value != replacements.end(). $i18n replacement key "variations_cmd_name" not found

Original change's description:
> Show Variations info in cmd format in about:version.
> 
> When navigating to about:version/?show-variations-cmd an additional section
> will appear showing complete set of client's variations in the command line
> formatting that can be used to reproduce the same exact state of variations.
> The displayed info contains all the trials including not activated ones
> marked by '*' along with the corresponding group assignment.
> It will also contain enabled and disabled features where the ones that should
> use the default value will be marked with '*'(e.g. expired trials).
> Trials that are unforcable through command line will be shown but warning will
> be shown when processing the command line input with unforcable trial.
> This CL doesn't cover iOS.
> 
> As the displayed text is huge I also changed the width of the text in the
> about:version page (not mobile) to be 60% of the page with a minimum of 800px
> as it used to be.
> 
> Bug: 694675
> TEST=unit test, manual testing
> 1. run chrome with --fake-variations-channel=beta
> 2. copying command line input from about:version/?show-variations-cmd
> 3. run chrome without channel but with command line input copied in step 2.
> 4. confirm about:version/?show-variations-cmd page shows the same info
> 
> Change-Id: Ie73174bd5bd1a02baa75cd3294fd36cf63b3c923
> Reviewed-on: https://chromium-review.googlesource.com/865286
> Commit-Queue: Gayane Petrosyan <gayane@chromium.org>
> Reviewed-by: Dave Schuyler <dschuyler@chromium.org>
> Reviewed-by: Alexei Svitkine <asvitkine@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#533742}

TBR=asvitkine@chromium.org,gayane@chromium.org,dschuyler@chromium.org

Change-Id: I81dd667cfde45c209eed9889c0785fc0587b123d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 694675
Reviewed-on: https://chromium-review.googlesource.com/898405Reviewed-by: default avatarTommy Steimel <steimel@chromium.org>
Commit-Queue: Tommy Steimel <steimel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#533844}
parent fcfb3ecc
...@@ -675,50 +675,6 @@ void FieldTrialList::AllStatesToString(std::string* output, ...@@ -675,50 +675,6 @@ void FieldTrialList::AllStatesToString(std::string* output,
} }
} }
// static
std::string FieldTrialList::AllParamsToString(bool include_expired,
EscapeDataFunc encode_data_func) {
FieldTrialParamAssociator* params_associator =
FieldTrialParamAssociator::GetInstance();
std::string output;
for (const auto& registered : GetRegisteredTrials()) {
FieldTrial::State trial;
if (!registered.second->GetStateWhileLocked(&trial, include_expired))
continue;
DCHECK_EQ(std::string::npos,
trial.trial_name->find(kPersistentStringSeparator));
DCHECK_EQ(std::string::npos,
trial.group_name->find(kPersistentStringSeparator));
std::map<std::string, std::string> params;
if (params_associator->GetFieldTrialParamsWithoutFallback(
*trial.trial_name, *trial.group_name, &params)) {
if (params.size() > 0) {
// Add comma to seprate from previous entry if it exists.
if (!output.empty())
output.append(1, ',');
output.append(encode_data_func(*trial.trial_name));
output.append(1, '.');
output.append(encode_data_func(*trial.group_name));
output.append(1, ':');
std::string param_str;
for (const auto& param : params) {
// Add separator from previous param information if it exists.
if (!param_str.empty())
param_str.append(1, kPersistentStringSeparator);
param_str.append(encode_data_func(param.first));
param_str.append(1, kPersistentStringSeparator);
param_str.append(encode_data_func(param.second));
}
output.append(param_str);
}
}
}
return output;
}
// static // static
void FieldTrialList::GetActiveFieldTrialGroups( void FieldTrialList::GetActiveFieldTrialGroups(
FieldTrial::ActiveGroups* active_groups) { FieldTrial::ActiveGroups* active_groups) {
...@@ -800,13 +756,8 @@ bool FieldTrialList::CreateTrialsFromString( ...@@ -800,13 +756,8 @@ bool FieldTrialList::CreateTrialsFromString(
const std::string trial_name = entry.trial_name.as_string(); const std::string trial_name = entry.trial_name.as_string();
const std::string group_name = entry.group_name.as_string(); const std::string group_name = entry.group_name.as_string();
if (ContainsKey(ignored_trial_names, trial_name)) { if (ContainsKey(ignored_trial_names, trial_name))
// This is to warn that the field trial forced through command-line
// input is unforcable.
// Use --enable-logging or --enable-logging=stderr to see this warning.
LOG(WARNING) << "Field trial: " << trial_name << " cannot be forced.";
continue; continue;
}
FieldTrial* trial = CreateFieldTrial(trial_name, group_name); FieldTrial* trial = CreateFieldTrial(trial_name, group_name);
if (!trial) if (!trial)
...@@ -1477,14 +1428,4 @@ void FieldTrialList::Register(FieldTrial* trial) { ...@@ -1477,14 +1428,4 @@ void FieldTrialList::Register(FieldTrial* trial) {
global_->registered_[trial->trial_name()] = trial; global_->registered_[trial->trial_name()] = trial;
} }
// static
FieldTrialList::RegistrationMap FieldTrialList::GetRegisteredTrials() {
RegistrationMap output;
if (global_) {
AutoLock auto_lock(global_->lock_);
output = global_->registered_;
}
return output;
}
} // namespace base } // namespace base
...@@ -393,10 +393,6 @@ class BASE_EXPORT FieldTrialList { ...@@ -393,10 +393,6 @@ class BASE_EXPORT FieldTrialList {
public: public:
typedef SharedPersistentMemoryAllocator FieldTrialAllocator; typedef SharedPersistentMemoryAllocator FieldTrialAllocator;
// Type for function pointer passed to |AllParamsToString| used to escape
// special characters from |input|.
typedef std::string (*EscapeDataFunc)(const std::string& input);
// Year that is guaranteed to not be expired when instantiating a field trial // Year that is guaranteed to not be expired when instantiating a field trial
// via |FactoryGetFieldTrial()|. Set to two years from the build date. // via |FactoryGetFieldTrial()|. Set to two years from the build date.
static int kNoExpirationYear; static int kNoExpirationYear;
...@@ -514,16 +510,6 @@ class BASE_EXPORT FieldTrialList { ...@@ -514,16 +510,6 @@ class BASE_EXPORT FieldTrialList {
// by |CreateTrialsFromString()|. // by |CreateTrialsFromString()|.
static void AllStatesToString(std::string* output, bool include_expired); static void AllStatesToString(std::string* output, bool include_expired);
// Creates a persistent representation of all FieldTrial params for
// resurrection in another process. The returned string contains the trial
// name and group name pairs of all registered FieldTrials including disabled
// based on |include_expired| separated by '.'. The pair is followed by ':'
// separator and list of param name and values separated by '/'. It also takes
// |encode_data_func| function pointer for encodeing special charactors.
// This string is parsed by |AssociateParamsFromString()|.
static std::string AllParamsToString(bool include_expired,
EscapeDataFunc encode_data_func);
// Fills in the supplied vector |active_groups| (which must be empty when // Fills in the supplied vector |active_groups| (which must be empty when
// called) with a snapshot of all registered FieldTrials for which the group // called) with a snapshot of all registered FieldTrials for which the group
// has been chosen and externally observed (via |group()|) and which have // has been chosen and externally observed (via |group()|) and which have
...@@ -737,9 +723,6 @@ class BASE_EXPORT FieldTrialList { ...@@ -737,9 +723,6 @@ class BASE_EXPORT FieldTrialList {
// This should always be called after creating a new FieldTrial instance. // This should always be called after creating a new FieldTrial instance.
static void Register(FieldTrial* trial); static void Register(FieldTrial* trial);
// Returns all the registered trials.
static RegistrationMap GetRegisteredTrials();
static FieldTrialList* global_; // The singleton of this class. static FieldTrialList* global_; // The singleton of this class.
// This will tell us if there is an attempt to register a field // This will tell us if there is an attempt to register a field
......
...@@ -75,10 +75,6 @@ class TestFieldTrialObserver : public FieldTrialList::Observer { ...@@ -75,10 +75,6 @@ class TestFieldTrialObserver : public FieldTrialList::Observer {
DISALLOW_COPY_AND_ASSIGN(TestFieldTrialObserver); DISALLOW_COPY_AND_ASSIGN(TestFieldTrialObserver);
}; };
std::string MockEscapeQueryParamValue(const std::string& input) {
return input;
}
} // namespace } // namespace
class FieldTrialTest : public ::testing::Test { class FieldTrialTest : public ::testing::Test {
...@@ -1410,36 +1406,4 @@ TEST(FieldTrialListTest, CheckReadOnlySharedMemoryHandle) { ...@@ -1410,36 +1406,4 @@ TEST(FieldTrialListTest, CheckReadOnlySharedMemoryHandle) {
} }
#endif // !OS_NACL && !OS_WIN && !OS_FUCHSIA #endif // !OS_NACL && !OS_WIN && !OS_FUCHSIA
TEST_F(FieldTrialTest, TestAllParamsToString) {
std::string exptected_output = "t1.g1:p1/v1/p2/v2";
// Create study with one group and two params.
std::map<std::string, std::string> params;
params["p1"] = "v1";
params["p2"] = "v2";
FieldTrialParamAssociator::GetInstance()->AssociateFieldTrialParams(
"t1", "g1", params);
EXPECT_EQ(
"", FieldTrialList::AllParamsToString(false, &MockEscapeQueryParamValue));
scoped_refptr<FieldTrial> trial1 =
CreateFieldTrial("t1", 100, "Default", nullptr);
trial1->AppendGroup("g1", 100);
trial1->group();
EXPECT_EQ(exptected_output, FieldTrialList::AllParamsToString(
false, &MockEscapeQueryParamValue));
// Create study with two groups and params that don't belog to the assigned
// group. This should be in the output.
FieldTrialParamAssociator::GetInstance()->AssociateFieldTrialParams(
"t2", "g2", params);
scoped_refptr<FieldTrial> trial2 =
CreateFieldTrial("t2", 100, "Default", nullptr);
trial2->AppendGroup("g1", 100);
trial2->AppendGroup("g2", 0);
trial2->group();
EXPECT_EQ(exptected_output, FieldTrialList::AllParamsToString(
false, &MockEscapeQueryParamValue));
}
} // namespace base } // namespace base
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "components/version_ui/version_ui_constants.h" #include "components/version_ui/version_ui_constants.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/plugin_service.h" #include "content/public/browser/plugin_service.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h" #include "content/public/browser/web_ui.h"
#include "content/public/common/content_constants.h" #include "content/public/common/content_constants.h"
#include "ppapi/features/features.h" #include "ppapi/features/features.h"
...@@ -54,7 +53,9 @@ void GetFilePaths(const base::FilePath& profile_path, ...@@ -54,7 +53,9 @@ void GetFilePaths(const base::FilePath& profile_path,
} // namespace } // namespace
VersionHandler::VersionHandler() : weak_ptr_factory_(this) {} VersionHandler::VersionHandler()
: weak_ptr_factory_(this) {
}
VersionHandler::~VersionHandler() { VersionHandler::~VersionHandler() {
} }
...@@ -67,7 +68,6 @@ void VersionHandler::RegisterMessages() { ...@@ -67,7 +68,6 @@ void VersionHandler::RegisterMessages() {
} }
void VersionHandler::HandleRequestVersionInfo(const base::ListValue* args) { void VersionHandler::HandleRequestVersionInfo(const base::ListValue* args) {
AllowJavascript();
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
// The Flash version information is needed in the response, so make sure // The Flash version information is needed in the response, so make sure
// the plugins are loaded. // the plugins are loaded.
...@@ -90,14 +90,8 @@ void VersionHandler::HandleRequestVersionInfo(const base::ListValue* args) { ...@@ -90,14 +90,8 @@ void VersionHandler::HandleRequestVersionInfo(const base::ListValue* args) {
base::Owned(exec_path_buffer), base::Owned(profile_path_buffer))); base::Owned(exec_path_buffer), base::Owned(profile_path_buffer)));
// Respond with the variations info immediately. // Respond with the variations info immediately.
CallJavascriptFunction(version_ui::kReturnVariationInfo, web_ui()->CallJavascriptFunctionUnsafe(version_ui::kReturnVariationInfo,
*version_ui::GetVariationsList()); *version_ui::GetVariationsList());
GURL current_url = web_ui()->GetWebContents()->GetVisibleURL();
if (current_url.query().find(version_ui::kVariationsShowCmdQuery) !=
std::string::npos) {
CallJavascriptFunction(version_ui::kReturnVariationCmd,
version_ui::GetVariationsCommandLineAsValue());
}
} }
void VersionHandler::OnGotFilePaths(base::string16* executable_path_data, void VersionHandler::OnGotFilePaths(base::string16* executable_path_data,
...@@ -106,7 +100,8 @@ void VersionHandler::OnGotFilePaths(base::string16* executable_path_data, ...@@ -106,7 +100,8 @@ void VersionHandler::OnGotFilePaths(base::string16* executable_path_data,
base::Value exec_path(*executable_path_data); base::Value exec_path(*executable_path_data);
base::Value profile_path(*profile_path_data); base::Value profile_path(*profile_path_data);
CallJavascriptFunction(version_ui::kReturnFilePaths, exec_path, profile_path); web_ui()->CallJavascriptFunctionUnsafe(version_ui::kReturnFilePaths,
exec_path, profile_path);
} }
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
...@@ -133,6 +128,6 @@ void VersionHandler::OnGotPlugins( ...@@ -133,6 +128,6 @@ void VersionHandler::OnGotPlugins(
base::Value arg(flash_version_and_path); base::Value arg(flash_version_and_path);
CallJavascriptFunction(version_ui::kReturnFlashVersion, arg); web_ui()->CallJavascriptFunctionUnsafe(version_ui::kReturnFlashVersion, arg);
} }
#endif // BUILDFLAG(ENABLE_PLUGINS) #endif // BUILDFLAG(ENABLE_PLUGINS)
...@@ -90,8 +90,7 @@ WebUIDataSource* CreateVersionUIDataSource() { ...@@ -90,8 +90,7 @@ WebUIDataSource* CreateVersionUIDataSource() {
html_source->AddString(version_ui::kProfilePath, std::string()); html_source->AddString(version_ui::kProfilePath, std::string());
html_source->AddLocalizedString(version_ui::kVariationsName, html_source->AddLocalizedString(version_ui::kVariationsName,
IDS_VERSION_UI_VARIATIONS); IDS_VERSION_UI_VARIATIONS);
html_source->AddLocalizedString(version_ui::kVariationsCmdName,
IDS_VERSION_UI_VARIATIONS_CMD);
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
html_source->AddLocalizedString(version_ui::kARC, IDS_ARC_LABEL); html_source->AddLocalizedString(version_ui::kARC, IDS_ARC_LABEL);
html_source->AddLocalizedString(version_ui::kPlatform, IDS_PLATFORM_LABEL); html_source->AddLocalizedString(version_ui::kPlatform, IDS_PLATFORM_LABEL);
......
...@@ -129,7 +129,6 @@ source_set("unit_tests") { ...@@ -129,7 +129,6 @@ source_set("unit_tests") {
"entropy_provider_unittest.cc", "entropy_provider_unittest.cc",
"experiment_labels_unittest.cc", "experiment_labels_unittest.cc",
"metrics_util_unittest.cc", "metrics_util_unittest.cc",
"net/variations_command_line_unittest.cc",
"net/variations_http_headers_unittest.cc", "net/variations_http_headers_unittest.cc",
"study_filtering_unittest.cc", "study_filtering_unittest.cc",
"synthetic_trial_registry_unittest.cc", "synthetic_trial_registry_unittest.cc",
...@@ -152,7 +151,6 @@ source_set("unit_tests") { ...@@ -152,7 +151,6 @@ source_set("unit_tests") {
"proto", "proto",
"//base/test:test_support", "//base/test:test_support",
"//components/prefs:test_support", "//components/prefs:test_support",
"//components/variations/field_trial_config:field_trial_config",
"//testing/gtest", "//testing/gtest",
"//third_party/zlib/google:compression_utils", "//third_party/zlib/google:compression_utils",
] ]
......
...@@ -4,8 +4,6 @@ ...@@ -4,8 +4,6 @@
static_library("net") { static_library("net") {
sources = [ sources = [
"variations_command_line.cc",
"variations_command_line.h",
"variations_http_headers.cc", "variations_http_headers.cc",
"variations_http_headers.h", "variations_http_headers.h",
] ]
...@@ -19,7 +17,6 @@ static_library("net") { ...@@ -19,7 +17,6 @@ static_library("net") {
"//base", "//base",
"//components/google/core/browser", "//components/google/core/browser",
"//components/metrics", "//components/metrics",
"//components/variations/field_trial_config",
"//components/variations/proto", "//components/variations/proto",
] ]
} }
// 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/variations/net/variations_command_line.h"
#include "base/base_switches.h"
#include "base/feature_list.h"
#include "base/metrics/field_trial.h"
#include "components/variations/field_trial_config/field_trial_util.h"
#include "components/variations/variations_switches.h"
#include "net/base/escape.h"
namespace variations {
namespace {
// Format the provided |param_key| and |param_value| as commandline input.
std::string GenerateParam(const std::string& param_key,
const std::string& param_value) {
if (!param_value.empty())
return " --" + param_key + "=\"" + param_value + "\"";
return "";
}
} // namespace
std::string GetVariationsCommandLine() {
std::string field_trial_states;
base::FieldTrialList::AllStatesToString(&field_trial_states, true);
std::string field_trial_params =
base::FieldTrialList::AllParamsToString(true, &EscapeValue);
std::string enable_features;
std::string disable_features;
base::FeatureList::GetInstance()->GetFeatureOverrides(&enable_features,
&disable_features);
std::string output;
output.append(
GenerateParam(::switches::kForceFieldTrials, field_trial_states));
output.append(
GenerateParam(switches::kForceFieldTrialParams, field_trial_params));
output.append(GenerateParam(::switches::kEnableFeatures, enable_features));
output.append(GenerateParam(::switches::kDisableFeatures, disable_features));
return output;
}
} // namespace variations
// 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_VARIATIONS_NET_VARIATIONS_COMMAND_LINE_H_
#define COMPONENTS_VARIATIONS_NET_VARIATIONS_COMMAND_LINE_H_
#include <string>
namespace variations {
// Generates a string containing the complete state of variations (including all
// the registered trials with corresponding groups, params and features) for the
// client in command-line format.
std::string GetVariationsCommandLine();
} // namespace variations
#endif // COMPONENTS_VARIATIONS_NET_VARIATIONS_COMMAND_LINE_H_
\ 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.
#include "components/variations/net/variations_command_line.h"
#include <stddef.h>
#include "base/macros.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/field_trial_params.h"
#include "base/test/scoped_feature_list.h"
#include "components/variations/field_trial_config/field_trial_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace variations {
TEST(VariationsCommandLineTest, TestGetVariationsCommandLine) {
std::string trial_list = "trial1/group1/*trial2/group2/";
std::string param_list = "trial1.group1:p1/v1/p2/2";
std::string enable_feature_list = "feature1<trial1";
std::string disable_feature_list = "feature2<trial2";
base::FieldTrialList field_trial_list(nullptr);
AssociateParamsFromString(param_list);
base::FieldTrialList::CreateTrialsFromString(trial_list,
std::set<std::string>());
base::test::ScopedFeatureList scoped_feature_list;
scoped_feature_list.InitFromCommandLine(enable_feature_list,
disable_feature_list);
std::string output = GetVariationsCommandLine();
EXPECT_NE(output.find(trial_list), std::string::npos);
EXPECT_NE(output.find(param_list), std::string::npos);
EXPECT_NE(output.find(enable_feature_list), std::string::npos);
EXPECT_NE(output.find(disable_feature_list), std::string::npos);
}
} // namespace variations
\ No newline at end of file
...@@ -13,6 +13,5 @@ static_library("version_ui") { ...@@ -13,6 +13,5 @@ static_library("version_ui") {
deps = [ deps = [
"//base", "//base",
"//components/variations", "//components/variations",
"//components/variations/net",
] ]
} }
...@@ -13,8 +13,7 @@ body { ...@@ -13,8 +13,7 @@ body {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
margin-top: 10px; margin-top: 10px;
min-width: 800px; width: 800px;
width: 60%;
} }
#inner { #inner {
...@@ -62,10 +61,3 @@ body { ...@@ -62,10 +61,3 @@ body {
padding-left: 5px; padding-left: 5px;
vertical-align: bottom; vertical-align: bottom;
} }
.version-wide {
font-family: monospace;
max-width: auto;
padding-left: 5px;
vertical-align: bottom;
}
...@@ -136,10 +136,6 @@ about:version template page ...@@ -136,10 +136,6 @@ about:version template page
<td class="label">$i18n{variations_name}</td> <td class="label">$i18n{variations_name}</td>
<td class="version" id="variations-list"></td> <td class="version" id="variations-list"></td>
</tr> </tr>
<tr id="variations-cmd-section" hidden>
<td class="label">$i18n{variations_cmd_name}</td>
<td class="version-wide" id="variations-cmd"></td>
</tr>
<if expr="is_win"> <if expr="is_win">
<tr id="compiler-section"> <tr id="compiler-section">
<td class="label">Compiler</td> <td class="label">Compiler</td>
......
...@@ -14,17 +14,6 @@ function returnVariationInfo(variationsList) { ...@@ -14,17 +14,6 @@ function returnVariationInfo(variationsList) {
parseHtmlSubset(variationsList.join('<br>'), ['BR'])); parseHtmlSubset(variationsList.join('<br>'), ['BR']));
} }
/**
* Callback from the backend with the variations formatted as command line
* input. This call will build the variations-cmd section of the version page
* if needed.
* @param {string} variationsCmd The variations info in command line format.
*/
function returnVariationCmd(variationsCmd) {
$('variations-cmd-section').hidden = !variationsCmd;
$('variations-cmd').textContent = variationsCmd;
}
/** /**
* Callback from the backend with the executable and profile paths to display. * Callback from the backend with the executable and profile paths to display.
* @param {string} execPath The executable path to display. * @param {string} execPath The executable path to display.
......
...@@ -7,13 +7,11 @@ ...@@ -7,13 +7,11 @@
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "base/base_switches.h"
#include "base/metrics/field_trial.h" #include "base/metrics/field_trial.h"
#include "base/strings/string_piece.h" #include "base/strings/string_piece.h"
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/values.h" #include "base/values.h"
#include "components/variations/active_field_trials.h" #include "components/variations/active_field_trials.h"
#include "components/variations/net/variations_command_line.h"
namespace version_ui { namespace version_ui {
...@@ -46,8 +44,4 @@ std::unique_ptr<base::Value> GetVariationsList() { ...@@ -46,8 +44,4 @@ std::unique_ptr<base::Value> GetVariationsList() {
return std::move(variations_list); return std::move(variations_list);
} }
base::Value GetVariationsCommandLineAsValue() {
return base::Value(variations::GetVariationsCommandLine());
}
} // namespace version_ui } // namespace version_ui
...@@ -16,10 +16,6 @@ namespace version_ui { ...@@ -16,10 +16,6 @@ namespace version_ui {
// Returns the list of variations to be displayed on the chrome:://version page. // Returns the list of variations to be displayed on the chrome:://version page.
std::unique_ptr<base::Value> GetVariationsList(); std::unique_ptr<base::Value> GetVariationsList();
// Returns the variations information in command line format to be displayed on
// the chrome:://version page.
base::Value GetVariationsCommandLineAsValue();
} // namespace version_ui } // namespace version_ui
#endif // COMPONENTS_VERSION_UI_VERSION_HANDLER_HELPER_H_ #endif // COMPONENTS_VERSION_UI_VERSION_HANDLER_HELPER_H_
...@@ -15,7 +15,6 @@ const char kRequestVersionInfo[] = "requestVersionInfo"; ...@@ -15,7 +15,6 @@ const char kRequestVersionInfo[] = "requestVersionInfo";
const char kReturnFilePaths[] = "returnFilePaths"; const char kReturnFilePaths[] = "returnFilePaths";
const char kReturnFlashVersion[] = "returnFlashVersion"; const char kReturnFlashVersion[] = "returnFlashVersion";
const char kReturnVariationInfo[] = "returnVariationInfo"; const char kReturnVariationInfo[] = "returnVariationInfo";
const char kReturnVariationCmd[] = "returnVariationCmd";
// Strings. // Strings.
const char kApplicationLabel[] = "application_label"; const char kApplicationLabel[] = "application_label";
...@@ -70,9 +69,7 @@ const char kRevision[] = "revision"; ...@@ -70,9 +69,7 @@ const char kRevision[] = "revision";
const char kTitle[] = "title"; const char kTitle[] = "title";
const char kUserAgent[] = "useragent"; const char kUserAgent[] = "useragent";
const char kUserAgentName[] = "user_agent_name"; const char kUserAgentName[] = "user_agent_name";
const char kVariationsCmdName[] = "variations_cmd_name";
const char kVariationsName[] = "variations_name"; const char kVariationsName[] = "variations_name";
const char kVariationsShowCmdQuery[] = "show-variations-cmd";
const char kVersion[] = "version"; const char kVersion[] = "version";
const char kVersionBitSize[] = "version_bitsize"; const char kVersionBitSize[] = "version_bitsize";
const char kVersionModifier[] = "version_modifier"; const char kVersionModifier[] = "version_modifier";
......
...@@ -20,7 +20,6 @@ extern const char kRequestVersionInfo[]; ...@@ -20,7 +20,6 @@ extern const char kRequestVersionInfo[];
extern const char kReturnFilePaths[]; extern const char kReturnFilePaths[];
extern const char kReturnFlashVersion[]; extern const char kReturnFlashVersion[];
extern const char kReturnVariationInfo[]; extern const char kReturnVariationInfo[];
extern const char kReturnVariationCmd[];
// Strings. // Strings.
// Must match the constants used in the resource files. // Must match the constants used in the resource files.
...@@ -76,9 +75,7 @@ extern const char kRevision[]; ...@@ -76,9 +75,7 @@ extern const char kRevision[];
extern const char kTitle[]; extern const char kTitle[];
extern const char kUserAgent[]; extern const char kUserAgent[];
extern const char kUserAgentName[]; extern const char kUserAgentName[];
extern const char kVariationsCmdName[];
extern const char kVariationsName[]; extern const char kVariationsName[];
extern const char kVariationsShowCmdQuery[];
extern const char kVersion[]; extern const char kVersion[];
extern const char kVersionBitSize[]; extern const char kVersionBitSize[];
extern const char kVersionModifier[]; extern const char kVersionModifier[];
......
...@@ -55,9 +55,6 @@ ...@@ -55,9 +55,6 @@
<message name="IDS_VERSION_UI_VARIATIONS" desc="label for the variations list on the about:version page"> <message name="IDS_VERSION_UI_VARIATIONS" desc="label for the variations list on the about:version page">
Variations Variations
</message> </message>
<message name="IDS_VERSION_UI_VARIATIONS_CMD" desc="label for the variations information in command-line format on the about:version page">
Command-line variations
</message>
<if expr="is_win"> <if expr="is_win">
<message translateable="false" name="IDS_VERSION_UI_COHORT_NAME" desc="Update cohort substring included in the version number line on the about:version page."> <message translateable="false" name="IDS_VERSION_UI_COHORT_NAME" desc="Update cohort substring included in the version number line on the about:version page.">
(cohort: <ph name="UPDATE_COHORT_NAME">$1<ex>Stable</ex></ph>) (cohort: <ph name="UPDATE_COHORT_NAME">$1<ex>Stable</ex></ph>)
......
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