OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 kOsAll, | 357 kOsAll, |
358 SINGLE_VALUE_TYPE(switches::kShowAutofillTypePredictions) | 358 SINGLE_VALUE_TYPE(switches::kShowAutofillTypePredictions) |
359 }, | 359 }, |
360 { | 360 { |
361 "sync-typed-urls", | 361 "sync-typed-urls", |
362 IDS_FLAGS_SYNC_TYPED_URLS_NAME, | 362 IDS_FLAGS_SYNC_TYPED_URLS_NAME, |
363 IDS_FLAGS_SYNC_TYPED_URLS_DESCRIPTION, | 363 IDS_FLAGS_SYNC_TYPED_URLS_DESCRIPTION, |
364 kOsAll, | 364 kOsAll, |
365 SINGLE_VALUE_TYPE(switches::kEnableSyncTypedUrls) | 365 SINGLE_VALUE_TYPE(switches::kEnableSyncTypedUrls) |
366 }, | 366 }, |
| 367 { |
| 368 "enable-smooth-scrolling", // FLAGS:RECORD_UMA |
| 369 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, |
| 370 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, |
| 371 // Can't expose the switch unless the code is compiled in. |
| 372 #if defined(ENABLE_SMOOTH_SCROLLING) |
| 373 kOsAll, |
| 374 #else |
| 375 0, |
| 376 #endif |
| 377 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) |
| 378 }, |
367 }; | 379 }; |
368 | 380 |
369 const Experiment* experiments = kExperiments; | 381 const Experiment* experiments = kExperiments; |
370 size_t num_experiments = arraysize(kExperiments); | 382 size_t num_experiments = arraysize(kExperiments); |
371 | 383 |
372 // Stores and encapsulates the little state that about:flags has. | 384 // Stores and encapsulates the little state that about:flags has. |
373 class FlagsState { | 385 class FlagsState { |
374 public: | 386 public: |
375 FlagsState() : needs_restart_(false) {} | 387 FlagsState() : needs_restart_(false) {} |
376 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); | 388 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
797 } | 809 } |
798 | 810 |
799 const Experiment* GetExperiments(size_t* count) { | 811 const Experiment* GetExperiments(size_t* count) { |
800 *count = num_experiments; | 812 *count = num_experiments; |
801 return experiments; | 813 return experiments; |
802 } | 814 } |
803 | 815 |
804 } // namespace testing | 816 } // namespace testing |
805 | 817 |
806 } // namespace about_flags | 818 } // namespace about_flags |
OLD | NEW |