summaryrefslogtreecommitdiffstats
path: root/chrome/app/breakpad_mac_stubs.mm
blob: b07ded6fbb8dc83da59932b873ae4fd990d37e98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#import "chrome/app/breakpad_mac.h"

#import <Foundation/Foundation.h>

// Stubbed out versions of breakpad integration functions so we can compile
// without linking in Breakpad.

bool IsCrashReporterEnabled() {
  return false;
}

void InitCrashProcessInfo() {
}

void DestructCrashReporter() {
}

void InitCrashReporter() {
}

void SetCrashKeyValue(NSString* key, NSString* value) {
}

void ClearCrashKeyValue(NSString* key) {
}

// NOTE(shess): These functions could clearly be replaced by stubs,
// but since they are seldom-used helpers, it seemed more reasonable
// to duplicate them from the primary implementation in
// breakpad_mac.mm.
ScopedCrashKey::ScopedCrashKey(NSString* key, NSString* value)
    : crash_key_([key retain]) {
  SetCrashKeyValue(crash_key_.get(), value);
}

ScopedCrashKey::~ScopedCrashKey() {
  ClearCrashKeyValue(crash_key_.get());
}