| 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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 SINGLE_VALUE_TYPE("") | 382 SINGLE_VALUE_TYPE("") |
| 383 #endif | 383 #endif |
| 384 }, | 384 }, |
| 385 { | 385 { |
| 386 "downloads-new-ui", // FLAGS:RECORD_UMA | 386 "downloads-new-ui", // FLAGS:RECORD_UMA |
| 387 IDS_FLAGS_DOWNLOADS_NEW_UI_NAME, | 387 IDS_FLAGS_DOWNLOADS_NEW_UI_NAME, |
| 388 IDS_FLAGS_DOWNLOADS_NEW_UI_DESCRIPTION, | 388 IDS_FLAGS_DOWNLOADS_NEW_UI_DESCRIPTION, |
| 389 kOsAll, | 389 kOsAll, |
| 390 SINGLE_VALUE_TYPE(switches::kDownloadsNewUI) | 390 SINGLE_VALUE_TYPE(switches::kDownloadsNewUI) |
| 391 }, | 391 }, |
| 392 { |
| 393 "enable-autologin", |
| 394 IDS_FLAGS_ENABLE_AUTOLOGIN_NAME, |
| 395 IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION, |
| 396 kOsMac | kOsWin | kOsLinux, |
| 397 SINGLE_VALUE_TYPE(switches::kEnableAutologin) |
| 398 }, |
| 392 }; | 399 }; |
| 393 | 400 |
| 394 const Experiment* experiments = kExperiments; | 401 const Experiment* experiments = kExperiments; |
| 395 size_t num_experiments = arraysize(kExperiments); | 402 size_t num_experiments = arraysize(kExperiments); |
| 396 | 403 |
| 397 // Stores and encapsulates the little state that about:flags has. | 404 // Stores and encapsulates the little state that about:flags has. |
| 398 class FlagsState { | 405 class FlagsState { |
| 399 public: | 406 public: |
| 400 FlagsState() : needs_restart_(false) {} | 407 FlagsState() : needs_restart_(false) {} |
| 401 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); | 408 void ConvertFlagsToSwitches(PrefService* prefs, CommandLine* command_line); |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 811 } | 818 } |
| 812 | 819 |
| 813 const Experiment* GetExperiments(size_t* count) { | 820 const Experiment* GetExperiments(size_t* count) { |
| 814 *count = num_experiments; | 821 *count = num_experiments; |
| 815 return experiments; | 822 return experiments; |
| 816 } | 823 } |
| 817 | 824 |
| 818 } // namespace testing | 825 } // namespace testing |
| 819 | 826 |
| 820 } // namespace about_flags | 827 } // namespace about_flags |
| OLD | NEW |