| 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 kOsAll, | 363 kOsAll, |
| 364 SINGLE_VALUE_TYPE(switches::kPrerenderFromOmnibox) | 364 SINGLE_VALUE_TYPE(switches::kPrerenderFromOmnibox) |
| 365 }, | 365 }, |
| 366 { | 366 { |
| 367 "enable-autofill-feedback", | 367 "enable-autofill-feedback", |
| 368 IDS_FLAGS_ENABLE_ADDITIONAL_AUTOFILL_FEEDBACK_NAME, | 368 IDS_FLAGS_ENABLE_ADDITIONAL_AUTOFILL_FEEDBACK_NAME, |
| 369 IDS_FLAGS_ENABLE_ADDITIONAL_AUTOFILL_FEEDBACK_DESCRIPTION, | 369 IDS_FLAGS_ENABLE_ADDITIONAL_AUTOFILL_FEEDBACK_DESCRIPTION, |
| 370 kOsAll, | 370 kOsAll, |
| 371 SINGLE_VALUE_TYPE(switches::kEnableAutofillFeedback) | 371 SINGLE_VALUE_TYPE(switches::kEnableAutofillFeedback) |
| 372 }, | 372 }, |
| 373 { |
| 374 "panels", |
| 375 IDS_FLAGS_ENABLE_PANELS_NAME, |
| 376 IDS_FLAGS_ENABLE_PANELS_DESCRIPTION, |
| 377 kOsAll, |
| 378 SINGLE_VALUE_TYPE(switches::kEnablePanels) |
| 379 }, |
| 373 }; | 380 }; |
| 374 | 381 |
| 375 const Experiment* experiments = kExperiments; | 382 const Experiment* experiments = kExperiments; |
| 376 size_t num_experiments = arraysize(kExperiments); | 383 size_t num_experiments = arraysize(kExperiments); |
| 377 | 384 |
| 378 // Stores and encapsulates the little state that about:flags has. | 385 // Stores and encapsulates the little state that about:flags has. |
| 379 class FlagsState { | 386 class FlagsState { |
| 380 public: | 387 public: |
| 381 FlagsState() : needs_restart_(false) {} | 388 FlagsState() : needs_restart_(false) {} |
| 382 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); | 389 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 } | 810 } |
| 804 | 811 |
| 805 const Experiment* GetExperiments(size_t* count) { | 812 const Experiment* GetExperiments(size_t* count) { |
| 806 *count = num_experiments; | 813 *count = num_experiments; |
| 807 return experiments; | 814 return experiments; |
| 808 } | 815 } |
| 809 | 816 |
| 810 } // namespace testing | 817 } // namespace testing |
| 811 | 818 |
| 812 } // namespace about_flags | 819 } // namespace about_flags |
| OLD | NEW |