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

Unified Diff: chrome/browser/about_flags.cc

Issue 1458043003: Added --force-ui-direction flag for developers to force LTR or RTL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/about_flags.cc
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index e5d3c8b3e6709f87c42bafe38c8825287ea9fc2a..0b32f7814a837f569a923fbe8abce91955c43e52 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -13,6 +13,7 @@
#include "base/callback.h"
#include "base/command_line.h"
#include "base/feature_list.h"
+#include "base/i18n/base_i18n_switches.h"
#include "base/memory/singleton.h"
#include "base/metrics/metrics_hashes.h"
#include "base/metrics/sparse_histogram.h"
@@ -513,6 +514,14 @@ const FeatureEntry::Choice kPpapiWin32kLockdown[] = {
};
#endif // defined(OS_WIN)
+const FeatureEntry::Choice kForceUIDirectionChoices[] = {
+ {IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT, "", ""},
+ {IDS_FLAGS_FORCE_UI_DIRECTION_LTR, switches::kForceUIDirection,
+ switches::kForceUIDirectionLTR},
+ {IDS_FLAGS_FORCE_UI_DIRECTION_RTL, switches::kForceUIDirection,
+ switches::kForceUIDirectionRTL},
+};
+
// RECORDING USER METRICS FOR FLAGS:
// -----------------------------------------------------------------------------
// The first line of the entry is the internal name. If you'd like to gather
@@ -2089,6 +2098,11 @@ const FeatureEntry kFeatureEntries[] = {
kOsWin,
FEATURE_VALUE_TYPE(kWindowsDesktopSearchRedirectionFeature)},
#endif // defined(OS_WIN)
+ {"force-ui-direction",
+ IDS_FLAGS_FORCE_UI_DIRECTION_NAME,
+ IDS_FLAGS_FORCE_UI_DIRECTION_DESCRIPTION,
+ kOsAll,
+ MULTI_VALUE_TYPE(kForceUIDirectionChoices)},
// NOTE: Adding new command-line switches requires adding corresponding
// entries to enum "LoginCustomFlags" in histograms.xml. See note in
// histograms.xml and don't forget to run AboutFlagsHistogramTest unit test.
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698