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> |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #endif | 59 #endif |
60 | 60 |
61 #if defined(ENABLE_APP_LIST) | 61 #if defined(ENABLE_APP_LIST) |
62 #include "ui/app_list/app_list_switches.h" | 62 #include "ui/app_list/app_list_switches.h" |
63 #endif | 63 #endif |
64 | 64 |
65 #if defined(ENABLE_EXTENSIONS) | 65 #if defined(ENABLE_EXTENSIONS) |
66 #include "extensions/common/switches.h" | 66 #include "extensions/common/switches.h" |
67 #endif | 67 #endif |
68 | 68 |
69 #if defined(USE_OZONE) | |
70 #include "ui/ozone/public/ozone_switches.h" | |
71 #endif | |
72 | |
73 namespace about_flags { | 69 namespace about_flags { |
74 | 70 |
75 // Macros to simplify specifying the type. | 71 // Macros to simplify specifying the type. |
76 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ | 72 #define SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, switch_value) \ |
77 Experiment::SINGLE_VALUE, \ | 73 Experiment::SINGLE_VALUE, \ |
78 command_line_switch, switch_value, NULL, NULL, NULL, 0 | 74 command_line_switch, switch_value, NULL, NULL, NULL, 0 |
79 #define SINGLE_VALUE_TYPE(command_line_switch) \ | 75 #define SINGLE_VALUE_TYPE(command_line_switch) \ |
80 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") | 76 SINGLE_VALUE_TYPE_AND_VALUE(command_line_switch, "") |
81 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ | 77 #define ENABLE_DISABLE_VALUE_TYPE_AND_VALUE(enable_switch, enable_value, \ |
82 disable_switch, disable_value) \ | 78 disable_switch, disable_value) \ |
(...skipping 2099 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2182 }, | 2178 }, |
2183 { | 2179 { |
2184 "use-sync-sandbox", | 2180 "use-sync-sandbox", |
2185 IDS_FLAGS_SYNC_SANDBOX_NAME, | 2181 IDS_FLAGS_SYNC_SANDBOX_NAME, |
2186 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION, | 2182 IDS_FLAGS_SYNC_SANDBOX_DESCRIPTION, |
2187 kOsAll, | 2183 kOsAll, |
2188 SINGLE_VALUE_TYPE_AND_VALUE( | 2184 SINGLE_VALUE_TYPE_AND_VALUE( |
2189 switches::kSyncServiceURL, | 2185 switches::kSyncServiceURL, |
2190 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha") | 2186 "https://chrome-sync.sandbox.google.com/chrome-sync/alpha") |
2191 }, | 2187 }, |
2192 #if defined(OS_CHROMEOS) && defined(USE_OZONE) | |
2193 { | |
2194 "ozone-test-single-overlay-support", | |
2195 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY, | |
2196 IDS_FLAGS_OZONE_TEST_SINGLE_HARDWARE_OVERLAY_DESCRIPTION, | |
2197 kOsCrOS, | |
2198 SINGLE_VALUE_TYPE(switches::kOzoneTestSingleOverlaySupport) | |
2199 }, | |
2200 #endif // defined(OS_CHROMEOS) && defined(USE_OZONE) | |
2201 | 2188 |
2202 // NOTE: Adding new command-line switches requires adding corresponding | 2189 // NOTE: Adding new command-line switches requires adding corresponding |
2203 // entries to enum "LoginCustomFlags" in histograms.xml. See note in | 2190 // entries to enum "LoginCustomFlags" in histograms.xml. See note in |
2204 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. | 2191 // histograms.xml and don't forget to run AboutFlagsHistogramTest unit test. |
2205 }; | 2192 }; |
2206 | 2193 |
2207 const Experiment* experiments = kExperiments; | 2194 const Experiment* experiments = kExperiments; |
2208 size_t num_experiments = arraysize(kExperiments); | 2195 size_t num_experiments = arraysize(kExperiments); |
2209 | 2196 |
2210 // Stores and encapsulates the little state that about:flags has. | 2197 // Stores and encapsulates the little state that about:flags has. |
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2794 } | 2781 } |
2795 | 2782 |
2796 const Experiment* GetExperiments(size_t* count) { | 2783 const Experiment* GetExperiments(size_t* count) { |
2797 *count = num_experiments; | 2784 *count = num_experiments; |
2798 return experiments; | 2785 return experiments; |
2799 } | 2786 } |
2800 | 2787 |
2801 } // namespace testing | 2788 } // namespace testing |
2802 | 2789 |
2803 } // namespace about_flags | 2790 } // namespace about_flags |
OLD | NEW |