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

Side by Side Diff: base/ios/weak_nsobject.h

Issue 2921903003: Remove base::NonThreadSafe now that all users are gone!! (Closed)
Patch Set: rebase on r477274 Created 3 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
« no previous file with comments | « base/BUILD.gn ('k') | base/threading/non_thread_safe.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef BASE_IOS_WEAK_NSOBJECT_H_ 5 #ifndef BASE_IOS_WEAK_NSOBJECT_H_
6 #define BASE_IOS_WEAK_NSOBJECT_H_ 6 #define BASE_IOS_WEAK_NSOBJECT_H_
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 #import <objc/runtime.h> 9 #import <objc/runtime.h>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/threading/non_thread_safe.h"
15 #include "base/threading/thread_checker.h" 14 #include "base/threading/thread_checker.h"
16 15
17 // WeakNSObject<> is patterned after scoped_nsobject<>, but instead of 16 // WeakNSObject<> is patterned after scoped_nsobject<>, but instead of
18 // maintaining ownership of an NSObject subclass object, it will nil itself out 17 // maintaining ownership of an NSObject subclass object, it will nil itself out
19 // when the object is deallocated. 18 // when the object is deallocated.
20 // 19 //
21 // WeakNSProtocol<> has the same behavior as WeakNSObject, but can be used 20 // WeakNSProtocol<> has the same behavior as WeakNSObject, but can be used
22 // with protocols. 21 // with protocols.
23 // 22 //
24 // Example usage (base::WeakNSObject<T>): 23 // Example usage (base::WeakNSObject<T>):
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 178
180 WeakNSObject& operator=(const WeakNSObject<id>& that) { 179 WeakNSObject& operator=(const WeakNSObject<id>& that) {
181 WeakNSProtocol<id>::operator=(that); 180 WeakNSProtocol<id>::operator=(that);
182 return *this; 181 return *this;
183 } 182 }
184 }; 183 };
185 184
186 } // namespace base 185 } // namespace base
187 186
188 #endif // BASE_IOS_WEAK_NSOBJECT_H_ 187 #endif // BASE_IOS_WEAK_NSOBJECT_H_
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | base/threading/non_thread_safe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698