OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/about_flags.h" | 5 #include "chrome/browser/about_flags.h" |
6 | 6 |
7 #include <iterator> | 7 #include <iterator> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/base_switches.h" | |
12 #include "base/command_line.h" | 13 #include "base/command_line.h" |
13 #include "base/memory/singleton.h" | 14 #include "base/memory/singleton.h" |
14 #include "base/metrics/sparse_histogram.h" | 15 #include "base/metrics/sparse_histogram.h" |
15 #include "base/stl_util.h" | 16 #include "base/stl_util.h" |
16 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
18 #include "base/strings/utf_string_conversions.h" | 19 #include "base/strings/utf_string_conversions.h" |
19 #include "base/values.h" | 20 #include "base/values.h" |
20 #include "cc/base/switches.h" | 21 #include "cc/base/switches.h" |
21 #include "chrome/browser/flags_storage.h" | 22 #include "chrome/browser/flags_storage.h" |
(...skipping 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2122 kOsAndroid, | 2123 kOsAndroid, |
2123 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNTPPopularSites, | 2124 ENABLE_DISABLE_VALUE_TYPE(switches::kEnableNTPPopularSites, |
2124 switches::kDisableNTPPopularSites)}, | 2125 switches::kDisableNTPPopularSites)}, |
2125 #endif // defined(OS_ANDROID) | 2126 #endif // defined(OS_ANDROID) |
2126 #if defined(OS_WIN) | 2127 #if defined(OS_WIN) |
2127 {"trace-export-events-to-etw", | 2128 {"trace-export-events-to-etw", |
2128 IDS_FLAGS_TRACE_EXPORT_EVENTS_TO_ETW_NAME, | 2129 IDS_FLAGS_TRACE_EXPORT_EVENTS_TO_ETW_NAME, |
2129 IDS_FLAGS_TRACE_EXPORT_EVENTS_TO_ETW_DESRIPTION, | 2130 IDS_FLAGS_TRACE_EXPORT_EVENTS_TO_ETW_DESRIPTION, |
2130 kOsWin, | 2131 kOsWin, |
2131 SINGLE_VALUE_TYPE(switches::kTraceExportEventsToETW)}, | 2132 SINGLE_VALUE_TYPE(switches::kTraceExportEventsToETW)}, |
2133 {"disable-merge-key-char-events", | |
2134 IDS_FLAGS_DISABLE_MERGE_KEY_CHAR_EVENTS_NAME, | |
yukawa
2015/08/19 06:17:52
If ENABLE_DISABLE_VALUE_TYPE works, can we rename
Shu Chen
2015/08/19 06:41:31
Done.
| |
2135 IDS_FLAGS_DISABLE_MERGE_KEY_CHAR_EVENTS_DESCRIPTION, | |
2136 kOsWin, | |
2137 SINGLE_VALUE_TYPE(switches::kDisableMergeKeyCharEvents)}, | |
yukawa
2015/08/19 06:17:52
I'm not familiar with this, but would it be possib
Shu Chen
2015/08/19 06:41:31
Done.
| |
2132 #endif // defined(OS_WIN) | 2138 #endif // defined(OS_WIN) |
2133 // NOTE: Adding new command-line switches requires adding corresponding | 2139 // NOTE: Adding new command-line switches requires adding corresponding |
2134 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2140 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
2135 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2141 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
2136 }; | 2142 }; |
2137 | 2143 |
2138 const Experiment* experiments = kExperiments; | 2144 const Experiment* experiments = kExperiments; |
2139 size_t num_experiments = arraysize(kExperiments); | 2145 size_t num_experiments = arraysize(kExperiments); |
2140 | 2146 |
2141 // Stores and encapsulates the little state that about:flags has. | 2147 // Stores and encapsulates the little state that about:flags has. |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2765 } | 2771 } |
2766 | 2772 |
2767 const Experiment* GetExperiments(size_t* count) { | 2773 const Experiment* GetExperiments(size_t* count) { |
2768 *count = num_experiments; | 2774 *count = num_experiments; |
2769 return experiments; | 2775 return experiments; |
2770 } | 2776 } |
2771 | 2777 |
2772 } // namespace testing | 2778 } // namespace testing |
2773 | 2779 |
2774 } // namespace about_flags | 2780 } // namespace about_flags |
OLD | NEW |