Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: components/crash/content/app/breakpad_mac.mm

Issue 2271653006: base::mac::IsOSSierra() -> base::mac::IsOS10_12(), etc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: Nits Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "components/crash/content/app/breakpad_mac.h" 5 #import "components/crash/content/app/breakpad_mac.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 [breakpad_config setObject:@"NO" forKey:@BREAKPAD_SEND_AND_EXIT]; 234 [breakpad_config setObject:@"NO" forKey:@BREAKPAD_SEND_AND_EXIT];
235 235
236 base::FilePath dir_crash_dumps; 236 base::FilePath dir_crash_dumps;
237 GetCrashReporterClient()->GetCrashDumpLocation(&dir_crash_dumps); 237 GetCrashReporterClient()->GetCrashDumpLocation(&dir_crash_dumps);
238 [breakpad_config setObject:base::SysUTF8ToNSString(dir_crash_dumps.value()) 238 [breakpad_config setObject:base::SysUTF8ToNSString(dir_crash_dumps.value())
239 forKey:@BREAKPAD_DUMP_DIRECTORY]; 239 forKey:@BREAKPAD_DUMP_DIRECTORY];
240 240
241 // Temporarily run Breakpad in-process on 10.10 and later because APIs that 241 // Temporarily run Breakpad in-process on 10.10 and later because APIs that
242 // it depends on got broken (http://crbug.com/386208). 242 // it depends on got broken (http://crbug.com/386208).
243 // This can catch crashes in the browser process only. 243 // This can catch crashes in the browser process only.
244 if (is_browser && base::mac::IsOSYosemiteOrLater()) { 244 if (is_browser && base::mac::IsAtLeastOS10_10()) {
245 [breakpad_config setObject:[NSNumber numberWithBool:YES] 245 [breakpad_config setObject:[NSNumber numberWithBool:YES]
246 forKey:@BREAKPAD_IN_PROCESS]; 246 forKey:@BREAKPAD_IN_PROCESS];
247 } 247 }
248 248
249 // Initialize Breakpad. 249 // Initialize Breakpad.
250 gBreakpadRef = BreakpadCreate(breakpad_config); 250 gBreakpadRef = BreakpadCreate(breakpad_config);
251 if (!gBreakpadRef) { 251 if (!gBreakpadRef) {
252 LOG_IF(ERROR, base::mac::AmIBundled()) << "Breakpad initialization failed"; 252 LOG_IF(ERROR, base::mac::AmIBundled()) << "Breakpad initialization failed";
253 return; 253 return;
254 } 254 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 // Store process type in crash dump. 290 // Store process type in crash dump.
291 SetCrashKeyValue(@"ptype", process_type); 291 SetCrashKeyValue(@"ptype", process_type);
292 292
293 NSString* pid_value = 293 NSString* pid_value =
294 [NSString stringWithFormat:@"%d", static_cast<unsigned int>(getpid())]; 294 [NSString stringWithFormat:@"%d", static_cast<unsigned int>(getpid())];
295 SetCrashKeyValue(@"pid", pid_value); 295 SetCrashKeyValue(@"pid", pid_value);
296 } 296 }
297 297
298 } // namespace breakpad 298 } // namespace breakpad
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/toolbar/toolbar_controller.mm ('k') | components/handoff/handoff_manager.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698