| 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 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 SetCrashKeyValueFuncPtr set_key_func) { | 168 SetCrashKeyValueFuncPtr set_key_func) { |
| 169 NSString *key = [NSString stringWithUTF8String:kNumberOfViews]; | 169 NSString *key = [NSString stringWithUTF8String:kNumberOfViews]; |
| 170 NSString *value = [NSString stringWithFormat:@"%d", number_of_views]; | 170 NSString *value = [NSString stringWithFormat:@"%d", number_of_views]; |
| 171 set_key_func(key, value); | 171 set_key_func(key, value); |
| 172 } | 172 } |
| 173 | 173 |
| 174 void SetNumberOfViews(int number_of_views) { | 174 void SetNumberOfViews(int number_of_views) { |
| 175 SetNumberOfViewsImpl(number_of_views, SetCrashKeyValue); | 175 SetNumberOfViewsImpl(number_of_views, SetCrashKeyValue); |
| 176 } | 176 } |
| 177 | 177 |
| 178 void SetCrashOnExit(bool crash_on_exit) { |
| 179 // TODO(eroman): Implement. See http://crbug.com/118665 |
| 180 } |
| 181 |
| 178 void SetCommandLine(const CommandLine* command_line) { | 182 void SetCommandLine(const CommandLine* command_line) { |
| 179 DCHECK(command_line); | 183 DCHECK(command_line); |
| 180 if (!command_line) | 184 if (!command_line) |
| 181 return; | 185 return; |
| 182 | 186 |
| 183 // These should match the corresponding strings in breakpad_win.cc. | 187 // These should match the corresponding strings in breakpad_win.cc. |
| 184 NSString* const kNumSwitchesKey = @"num-switches"; | 188 NSString* const kNumSwitchesKey = @"num-switches"; |
| 185 NSString* const kSwitchKeyFormat = @"switch-%zu"; // 1-based. | 189 NSString* const kSwitchKeyFormat = @"switch-%zu"; // 1-based. |
| 186 | 190 |
| 187 // Note the total number of switches, not including the exec path. | 191 // Note the total number of switches, not including the exec path. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 206 } | 210 } |
| 207 | 211 |
| 208 void SetChannel(const std::string& channel) { | 212 void SetChannel(const std::string& channel) { |
| 209 // This should match the corresponding string in breakpad_win.cc. | 213 // This should match the corresponding string in breakpad_win.cc. |
| 210 NSString* const kChannelKey = @"channel"; | 214 NSString* const kChannelKey = @"channel"; |
| 211 | 215 |
| 212 SetCrashKeyValue(kChannelKey, base::SysUTF8ToNSString(channel)); | 216 SetCrashKeyValue(kChannelKey, base::SysUTF8ToNSString(channel)); |
| 213 } | 217 } |
| 214 | 218 |
| 215 } // namespace child_process_logging | 219 } // namespace child_process_logging |
| OLD | NEW |