OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <iterator> | 7 #include <iterator> |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 unsigned bit; | 99 unsigned bit; |
100 const char* const name; | 100 const char* const name; |
101 } kBitsToOs[] = { | 101 } kBitsToOs[] = { |
102 {kOsMac, "Mac"}, | 102 {kOsMac, "Mac"}, |
103 {kOsWin, "Windows"}, | 103 {kOsWin, "Windows"}, |
104 {kOsLinux, "Linux"}, | 104 {kOsLinux, "Linux"}, |
105 {kOsCrOS, "Chrome OS"}, | 105 {kOsCrOS, "Chrome OS"}, |
106 {kOsAndroid, "Android"}, | 106 {kOsAndroid, "Android"}, |
107 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"}, | 107 {kOsCrOSOwnerOnly, "Chrome OS (owner only)"}, |
108 }; | 108 }; |
109 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kBitsToOs); ++i) | 109 for (size_t i = 0; i < arraysize(kBitsToOs); ++i) |
110 if (bitmask & kBitsToOs[i].bit) | 110 if (bitmask & kBitsToOs[i].bit) |
111 list->Append(new base::StringValue(kBitsToOs[i].name)); | 111 list->Append(new base::StringValue(kBitsToOs[i].name)); |
112 } | 112 } |
113 | 113 |
114 // Convert switch constants to proper CommandLine::StringType strings. | 114 // Convert switch constants to proper CommandLine::StringType strings. |
115 CommandLine::StringType GetSwitchString(const std::string& flag) { | 115 CommandLine::StringType GetSwitchString(const std::string& flag) { |
116 CommandLine cmd_line(CommandLine::NO_PROGRAM); | 116 CommandLine cmd_line(CommandLine::NO_PROGRAM); |
117 cmd_line.AppendSwitch(flag); | 117 cmd_line.AppendSwitch(flag); |
118 DCHECK_EQ(2U, cmd_line.argv().size()); | 118 DCHECK_EQ(2U, cmd_line.argv().size()); |
119 return cmd_line.argv()[1]; | 119 return cmd_line.argv()[1]; |
(...skipping 2437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2557 } | 2557 } |
2558 | 2558 |
2559 const Experiment* GetExperiments(size_t* count) { | 2559 const Experiment* GetExperiments(size_t* count) { |
2560 *count = num_experiments; | 2560 *count = num_experiments; |
2561 return experiments; | 2561 return experiments; |
2562 } | 2562 } |
2563 | 2563 |
2564 } // namespace testing | 2564 } // namespace testing |
2565 | 2565 |
2566 } // namespace about_flags | 2566 } // namespace about_flags |
OLD | NEW |