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

Side by Side Diff: chrome/common/mac/objc_method_swizzle.mm

Issue 17627005: mac: Remove unused includes of scoped_nsobject.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: builds Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/mac/objc_method_swizzle.h" 5 #import "chrome/common/mac/objc_method_swizzle.h"
6 6
7 #import "base/logging.h" 7 #import "base/logging.h"
8 #import "base/mac/scoped_nsobject.h"
9 8
10 namespace ObjcEvilDoers { 9 namespace ObjcEvilDoers {
11 10
12 Method GetImplementedInstanceMethod(Class aClass, SEL aSelector) { 11 Method GetImplementedInstanceMethod(Class aClass, SEL aSelector) {
13 Method method = NULL; 12 Method method = NULL;
14 unsigned int methodCount = 0; 13 unsigned int methodCount = 0;
15 Method* methodList = class_copyMethodList(aClass, &methodCount); 14 Method* methodList = class_copyMethodList(aClass, &methodCount);
16 if (methodList) { 15 if (methodList) {
17 for (unsigned int i = 0; i < methodCount; ++i) { 16 for (unsigned int i = 0; i < methodCount; ++i) {
18 if (method_getName(methodList[i]) == aSelector) { 17 if (method_getName(methodList[i]) == aSelector) {
(...skipping 30 matching lines...) Expand all
49 } 48 }
50 49
51 IMP ret = method_getImplementation(original); 50 IMP ret = method_getImplementation(original);
52 if (ret) { 51 if (ret) {
53 method_exchangeImplementations(original, alternate); 52 method_exchangeImplementations(original, alternate);
54 } 53 }
55 return ret; 54 return ret;
56 } 55 }
57 56
58 } // namespace ObjcEvilDoers 57 } // namespace ObjcEvilDoers
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app_mac.mm ('k') | content/browser/accessibility/browser_accessibility_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698