| 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/common/child_process_logging.h" | 5 #include "chrome/common/child_process_logging.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_split.h" | 10 #include "base/string_split.h" |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 argv_i < argv.size() && argv_i <= kMaxSwitches; | 136 argv_i < argv.size() && argv_i <= kMaxSwitches; |
| 137 ++argv_i) { | 137 ++argv_i) { |
| 138 command_line_str += argv[argv_i]; | 138 command_line_str += argv[argv_i]; |
| 139 // Truncate long switches, align short ones with spaces to be trimmed later. | 139 // Truncate long switches, align short ones with spaces to be trimmed later. |
| 140 command_line_str.resize(argv_i * kSwitchLen, ' '); | 140 command_line_str.resize(argv_i * kSwitchLen, ' '); |
| 141 } | 141 } |
| 142 strncpy(g_switches, command_line_str.c_str(), kMaxSwitchesSize - 1); | 142 strncpy(g_switches, command_line_str.c_str(), kMaxSwitchesSize - 1); |
| 143 g_switches[kMaxSwitchesSize - 1] = '\0'; | 143 g_switches[kMaxSwitchesSize - 1] = '\0'; |
| 144 } | 144 } |
| 145 | 145 |
| 146 void SetExperimentList(const std::vector<string16>& state) { |
| 147 // TODO(mad): Implement this. |
| 148 } |
| 149 |
| 146 void SetChannel(const std::string& channel) { | 150 void SetChannel(const std::string& channel) { |
| 147 strncpy(g_channel, channel.c_str(), kChannelSize - 1); | 151 strncpy(g_channel, channel.c_str(), kChannelSize - 1); |
| 148 g_channel[kChannelSize - 1] = '\0'; | 152 g_channel[kChannelSize - 1] = '\0'; |
| 149 } | 153 } |
| 150 | 154 |
| 151 } // namespace child_process_logging | 155 } // namespace child_process_logging |
| OLD | NEW |