OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #import "chrome/app/breakpad_mac.h" | 5 #import "chrome/app/breakpad_mac.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/base_switches.h" | 9 #include "base/base_switches.h" |
10 #import "base/basictypes.h" | 10 #import "base/basictypes.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 SetCrashKeyValue(@"prod", [info_dictionary objectForKey:@BREAKPAD_PRODUCT]); | 127 SetCrashKeyValue(@"prod", [info_dictionary objectForKey:@BREAKPAD_PRODUCT]); |
128 SetCrashKeyValue(@"plat", @"OS X"); | 128 SetCrashKeyValue(@"plat", @"OS X"); |
129 | 129 |
130 // Enable child process crashes to include the page URL. | 130 // Enable child process crashes to include the page URL. |
131 // TODO: Should this only be done for certain process types? | 131 // TODO: Should this only be done for certain process types? |
132 child_process_logging::SetCrashKeyFunctions(SetCrashKeyValue, | 132 child_process_logging::SetCrashKeyFunctions(SetCrashKeyValue, |
133 ClearCrashKeyValue); | 133 ClearCrashKeyValue); |
134 | 134 |
135 if (!is_browser) { | 135 if (!is_browser) { |
136 // Get the guid from the command line switch. | 136 // Get the guid from the command line switch. |
137 std::string guid = WideToASCII( | 137 std::string guid = |
138 command_line->GetSwitchValue(switches::kEnableCrashReporter)); | 138 command_line->GetSwitchValueASCII(switches::kEnableCrashReporter); |
139 child_process_logging::SetClientId(guid); | 139 child_process_logging::SetClientId(guid); |
140 } | 140 } |
141 } | 141 } |
142 | 142 |
143 void InitCrashProcessInfo() { | 143 void InitCrashProcessInfo() { |
144 if (gBreakpadRef == NULL) { | 144 if (gBreakpadRef == NULL) { |
145 return; | 145 return; |
146 } | 146 } |
147 | 147 |
148 // Determine the process type. | 148 // Determine the process type. |
(...skipping 20 matching lines...) Expand all Loading... |
169 BreakpadAddUploadParameter(gBreakpadRef, key, value); | 169 BreakpadAddUploadParameter(gBreakpadRef, key, value); |
170 } | 170 } |
171 | 171 |
172 void ClearCrashKeyValue(NSString* key) { | 172 void ClearCrashKeyValue(NSString* key) { |
173 if (gBreakpadRef == NULL) { | 173 if (gBreakpadRef == NULL) { |
174 return; | 174 return; |
175 } | 175 } |
176 | 176 |
177 BreakpadRemoveUploadParameter(gBreakpadRef, key); | 177 BreakpadRemoveUploadParameter(gBreakpadRef, key); |
178 } | 178 } |
OLD | NEW |