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