| 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, | 369 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME, |
| 370 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, | 370 IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION, |
| 371 // Can't expose the switch unless the code is compiled in. | 371 // Can't expose the switch unless the code is compiled in. |
| 372 #if defined(ENABLE_SMOOTH_SCROLLING) | 372 #if defined(ENABLE_SMOOTH_SCROLLING) |
| 373 kOsAll, | 373 kOsAll, |
| 374 #else | 374 #else |
| 375 0, | 375 0, |
| 376 #endif | 376 #endif |
| 377 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) | 377 SINGLE_VALUE_TYPE(switches::kEnableSmoothScrolling) |
| 378 }, | 378 }, |
| 379 { |
| 380 "prerender-from-omnibox", |
| 381 IDS_FLAGS_PRERENDER_FROM_OMNIBOX_NAME, |
| 382 IDS_FLAGS_PRERENDER_FROM_OMNIBOX_DESCRIPTION, |
| 383 kOsAll, |
| 384 SINGLE_VALUE_TYPE(switches::kPrerenderFromOmnibox) |
| 385 }, |
| 379 }; | 386 }; |
| 380 | 387 |
| 381 const Experiment* experiments = kExperiments; | 388 const Experiment* experiments = kExperiments; |
| 382 size_t num_experiments = arraysize(kExperiments); | 389 size_t num_experiments = arraysize(kExperiments); |
| 383 | 390 |
| 384 // Stores and encapsulates the little state that about:flags has. | 391 // Stores and encapsulates the little state that about:flags has. |
| 385 class FlagsState { | 392 class FlagsState { |
| 386 public: | 393 public: |
| 387 FlagsState() : needs_restart_(false) {} | 394 FlagsState() : needs_restart_(false) {} |
| 388 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); | 395 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 } | 816 } |
| 810 | 817 |
| 811 const Experiment* GetExperiments(size_t* count) { | 818 const Experiment* GetExperiments(size_t* count) { |
| 812 *count = num_experiments; | 819 *count = num_experiments; |
| 813 return experiments; | 820 return experiments; |
| 814 } | 821 } |
| 815 | 822 |
| 816 } // namespace testing | 823 } // namespace testing |
| 817 | 824 |
| 818 } // namespace about_flags | 825 } // namespace about_flags |
| OLD | NEW |