| 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/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/memory/singleton.h" | 13 #include "base/memory/singleton.h" |
| 14 #include "base/metrics/sparse_histogram.h" | 14 #include "base/metrics/sparse_histogram.h" |
| 15 #include "base/stl_util.h" | 15 #include "base/stl_util.h" |
| 16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
| 17 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
| 18 #include "base/strings/utf_string_conversions.h" | 18 #include "base/strings/utf_string_conversions.h" |
| 19 #include "base/values.h" | 19 #include "base/values.h" |
| 20 #include "cc/base/switches.h" | 20 #include "cc/base/switches.h" |
| 21 #include "chrome/browser/flags_storage.h" | 21 #include "chrome/browser/flags_storage.h" |
| 22 #include "chrome/common/chrome_content_client.h" | 22 #include "chrome/common/chrome_content_client.h" |
| 23 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
| 24 #include "chrome/grit/chromium_strings.h" | 24 #include "chrome/grit/chromium_strings.h" |
| 25 #include "chrome/grit/generated_resources.h" | 25 #include "chrome/grit/generated_resources.h" |
| 26 #include "chrome/grit/google_chrome_strings.h" | 26 #include "chrome/grit/google_chrome_strings.h" |
| 27 #include "components/autofill/core/common/autofill_switches.h" | 27 #include "components/autofill/core/common/autofill_switches.h" |
| 28 #include "components/cloud_devices/common/cloud_devices_switches.h" | 28 #include "components/cloud_devices/common/cloud_devices_switches.h" |
| 29 #include "components/content_settings/core/common/content_settings_switches.h" |
| 29 #include "components/metrics/metrics_hashes.h" | 30 #include "components/metrics/metrics_hashes.h" |
| 30 #include "components/nacl/common/nacl_switches.h" | 31 #include "components/nacl/common/nacl_switches.h" |
| 31 #include "components/omnibox/omnibox_switches.h" | 32 #include "components/omnibox/omnibox_switches.h" |
| 32 #include "components/proximity_auth/switches.h" | 33 #include "components/proximity_auth/switches.h" |
| 33 #include "components/search/search_switches.h" | 34 #include "components/search/search_switches.h" |
| 34 #include "content/public/browser/user_metrics.h" | 35 #include "content/public/browser/user_metrics.h" |
| 35 #include "media/base/media_switches.h" | 36 #include "media/base/media_switches.h" |
| 36 #include "ui/base/l10n/l10n_util.h" | 37 #include "ui/base/l10n/l10n_util.h" |
| 37 #include "ui/base/ui_base_switches.h" | 38 #include "ui/base/ui_base_switches.h" |
| 38 #include "ui/display/display_switches.h" | 39 #include "ui/display/display_switches.h" |
| (...skipping 2050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2089 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION, | 2090 IDS_FLAGS_REDUCED_REFERRER_GRANULARITY_DESCRIPTION, |
| 2090 kOsAll, | 2091 kOsAll, |
| 2091 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity) | 2092 SINGLE_VALUE_TYPE(switches::kReducedReferrerGranularity) |
| 2092 }, | 2093 }, |
| 2093 #if defined(ENABLE_PLUGINS) | 2094 #if defined(ENABLE_PLUGINS) |
| 2094 { | 2095 { |
| 2095 "enable-plugin-power-saver", | 2096 "enable-plugin-power-saver", |
| 2096 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME, | 2097 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_NAME, |
| 2097 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION, | 2098 IDS_FLAGS_ENABLE_PLUGIN_POWER_SAVER_DESCRIPTION, |
| 2098 kOsDesktop, | 2099 kOsDesktop, |
| 2099 ENABLE_DISABLE_VALUE_TYPE(switches::kEnablePluginPowerSaver, | 2100 ENABLE_DISABLE_VALUE_TYPE( |
| 2100 switches::kDisablePluginPowerSaver) | 2101 content_settings::switches::kEnablePluginPowerSaver, |
| 2102 content_settings::switches::kDisablePluginPowerSaver) |
| 2101 }, | 2103 }, |
| 2102 #endif | 2104 #endif |
| 2103 #if defined(OS_CHROMEOS) | 2105 #if defined(OS_CHROMEOS) |
| 2104 { | 2106 { |
| 2105 "disable-new-zip-unpacker", | 2107 "disable-new-zip-unpacker", |
| 2106 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME, | 2108 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_NAME, |
| 2107 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION, | 2109 IDS_FLAGS_DISABLE_NEW_ZIP_UNPACKER_DESCRIPTION, |
| 2108 kOsCrOS, | 2110 kOsCrOS, |
| 2109 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker) | 2111 SINGLE_VALUE_TYPE(chromeos::switches::kDisableNewZIPUnpacker) |
| 2110 }, | 2112 }, |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2933 } | 2935 } |
| 2934 | 2936 |
| 2935 const Experiment* GetExperiments(size_t* count) { | 2937 const Experiment* GetExperiments(size_t* count) { |
| 2936 *count = num_experiments; | 2938 *count = num_experiments; |
| 2937 return experiments; | 2939 return experiments; |
| 2938 } | 2940 } |
| 2939 | 2941 |
| 2940 } // namespace testing | 2942 } // namespace testing |
| 2941 | 2943 |
| 2942 } // namespace about_flags | 2944 } // namespace about_flags |
| OLD | NEW |