| 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 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 665 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); | 665 FlagsState::GetInstance()->RemoveFlagsSwitches(switch_list); |
| 666 } | 666 } |
| 667 | 667 |
| 668 int GetCurrentPlatform() { | 668 int GetCurrentPlatform() { |
| 669 #if defined(OS_MACOSX) | 669 #if defined(OS_MACOSX) |
| 670 return kOsMac; | 670 return kOsMac; |
| 671 #elif defined(OS_WIN) | 671 #elif defined(OS_WIN) |
| 672 return kOsWin; | 672 return kOsWin; |
| 673 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. | 673 #elif defined(OS_CHROMEOS) // Needs to be before the OS_LINUX check. |
| 674 return kOsCrOS; | 674 return kOsCrOS; |
| 675 #elif defined(OS_LINUX) | 675 #elif defined(OS_LINUX) || defined(OS_OPENBSD) |
| 676 return kOsLinux; | 676 return kOsLinux; |
| 677 #else | 677 #else |
| 678 #error Unknown platform | 678 #error Unknown platform |
| 679 #endif | 679 #endif |
| 680 } | 680 } |
| 681 | 681 |
| 682 void RecordUMAStatistics(const PrefService* prefs) { | 682 void RecordUMAStatistics(const PrefService* prefs) { |
| 683 std::set<std::string> flags; | 683 std::set<std::string> flags; |
| 684 GetEnabledFlags(prefs, &flags); | 684 GetEnabledFlags(prefs, &flags); |
| 685 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end(); | 685 for (std::set<std::string>::iterator it = flags.begin(); it != flags.end(); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 } | 856 } |
| 857 | 857 |
| 858 const Experiment* GetExperiments(size_t* count) { | 858 const Experiment* GetExperiments(size_t* count) { |
| 859 *count = num_experiments; | 859 *count = num_experiments; |
| 860 return experiments; | 860 return experiments; |
| 861 } | 861 } |
| 862 | 862 |
| 863 } // namespace testing | 863 } // namespace testing |
| 864 | 864 |
| 865 } // namespace about_flags | 865 } // namespace about_flags |
| OLD | NEW |