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 <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1629 kOsAll, | 1629 kOsAll, |
1630 MULTI_VALUE_TYPE(kMapImageChoices) | 1630 MULTI_VALUE_TYPE(kMapImageChoices) |
1631 }, | 1631 }, |
1632 { | 1632 { |
1633 "enable-device-motion", | 1633 "enable-device-motion", |
1634 IDS_FLAGS_ENABLE_DEVICE_MOTION_NAME, | 1634 IDS_FLAGS_ENABLE_DEVICE_MOTION_NAME, |
1635 IDS_FLAGS_ENABLE_DEVICE_MOTION_DESCRIPTION, | 1635 IDS_FLAGS_ENABLE_DEVICE_MOTION_DESCRIPTION, |
1636 kOsDesktop, | 1636 kOsDesktop, |
1637 SINGLE_VALUE_TYPE(switches::kEnableDeviceMotion) | 1637 SINGLE_VALUE_TYPE(switches::kEnableDeviceMotion) |
1638 }, | 1638 }, |
| 1639 { |
| 1640 "enable-add-to-homescreen", |
| 1641 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_NAME, |
| 1642 IDS_FLAGS_ENABLE_ADD_TO_HOMESCREEN_DESCRIPTION, |
| 1643 kOsAndroid, |
| 1644 #if defined(OS_ANDROID) |
| 1645 SINGLE_VALUE_TYPE(switches::kEnableAddToHomescreen) |
| 1646 #else |
| 1647 SINGLE_VALUE_TYPE("") |
| 1648 #endif |
| 1649 }, |
1639 }; | 1650 }; |
1640 | 1651 |
1641 const Experiment* experiments = kExperiments; | 1652 const Experiment* experiments = kExperiments; |
1642 size_t num_experiments = arraysize(kExperiments); | 1653 size_t num_experiments = arraysize(kExperiments); |
1643 | 1654 |
1644 // Stores and encapsulates the little state that about:flags has. | 1655 // Stores and encapsulates the little state that about:flags has. |
1645 class FlagsState { | 1656 class FlagsState { |
1646 public: | 1657 public: |
1647 FlagsState() : needs_restart_(false) {} | 1658 FlagsState() : needs_restart_(false) {} |
1648 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, | 1659 void ConvertFlagsToSwitches(FlagsStorage* flags_storage, |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2121 } | 2132 } |
2122 | 2133 |
2123 const Experiment* GetExperiments(size_t* count) { | 2134 const Experiment* GetExperiments(size_t* count) { |
2124 *count = num_experiments; | 2135 *count = num_experiments; |
2125 return experiments; | 2136 return experiments; |
2126 } | 2137 } |
2127 | 2138 |
2128 } // namespace testing | 2139 } // namespace testing |
2129 | 2140 |
2130 } // namespace about_flags | 2141 } // namespace about_flags |
OLD | NEW |