| 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_util.h" | 10 #include "base/string_util.h" |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 strncpy(g_switches, command_line_str.c_str(), kMaxSwitchesSize - 1); | 125 strncpy(g_switches, command_line_str.c_str(), kMaxSwitchesSize - 1); |
| 126 g_switches[kMaxSwitchesSize - 1] = '\0'; | 126 g_switches[kMaxSwitchesSize - 1] = '\0'; |
| 127 } | 127 } |
| 128 | 128 |
| 129 void SetChannel(const std::string& channel) { | 129 void SetChannel(const std::string& channel) { |
| 130 strncpy(g_channel, channel.c_str(), kChannelSize - 1); | 130 strncpy(g_channel, channel.c_str(), kChannelSize - 1); |
| 131 g_channel[kChannelSize - 1] = '\0'; | 131 g_channel[kChannelSize - 1] = '\0'; |
| 132 } | 132 } |
| 133 | 133 |
| 134 } // namespace child_process_logging | 134 } // namespace child_process_logging |
| OLD | NEW |