| Index: chrome/common/mac/objc_zombie.mm
|
| diff --git a/chrome/browser/ui/cocoa/objc_zombie.mm b/chrome/common/mac/objc_zombie.mm
|
| similarity index 98%
|
| copy from chrome/browser/ui/cocoa/objc_zombie.mm
|
| copy to chrome/common/mac/objc_zombie.mm
|
| index ea892daa3a660052ee8a1f55b60258493de97c39..c60981bd7a84a2d74ff53f7c70323b5ca0e4f8fa 100644
|
| --- a/chrome/browser/ui/cocoa/objc_zombie.mm
|
| +++ b/chrome/common/mac/objc_zombie.mm
|
| @@ -2,7 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#import "chrome/browser/ui/cocoa/objc_zombie.h"
|
| +#import "chrome/common/mac/objc_zombie.h"
|
|
|
| #include <dlfcn.h>
|
| #include <execinfo.h>
|
| @@ -20,7 +20,7 @@
|
| #include "base/metrics/histogram.h"
|
| #include "base/synchronization/lock.h"
|
| #import "chrome/app/breakpad_mac.h"
|
| -#import "chrome/browser/ui/cocoa/objc_method_swizzle.h"
|
| +#import "chrome/common/mac/objc_method_swizzle.h"
|
|
|
| // Deallocated objects are re-classed as |CrZombie|. No superclass
|
| // because then the class would have to override many/most of the
|
| @@ -446,21 +446,21 @@ BOOL ZombieInit() {
|
|
|
| namespace ObjcEvilDoers {
|
|
|
| -BOOL ZombieEnable(BOOL zombieAllObjects,
|
| +bool ZombieEnable(bool zombieAllObjects,
|
| size_t zombieCount) {
|
| // Only allow enable/disable on the main thread, just to keep things
|
| // simple.
|
| CHECK([NSThread isMainThread]);
|
|
|
| if (!ZombieInit())
|
| - return NO;
|
| + return false;
|
|
|
| g_zombieAllObjects = zombieAllObjects;
|
|
|
| // Replace the implementation of -[NSObject dealloc].
|
| Method m = class_getInstanceMethod([NSObject class], @selector(dealloc));
|
| if (!m)
|
| - return NO;
|
| + return false;
|
|
|
| const IMP prevDeallocIMP = method_setImplementation(m, (IMP)ZombieDealloc);
|
| DCHECK(prevDeallocIMP == g_originalDeallocIMP ||
|
| @@ -491,7 +491,7 @@ BOOL ZombieEnable(BOOL zombieAllObjects,
|
| g_zombieCount = oldCount;
|
| g_zombieIndex = oldIndex;
|
| ZombieDisable();
|
| - return NO;
|
| + return false;
|
| }
|
| }
|
|
|
| @@ -521,7 +521,7 @@ BOOL ZombieEnable(BOOL zombieAllObjects,
|
| free(oldZombies);
|
| }
|
|
|
| - return YES;
|
| + return true;
|
| }
|
|
|
| void ZombieDisable() {
|
|
|