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

Side by Side Diff: base/ios/crb_protocol_observers_unittest.mm

Issue 1424713006: ios: Stop using __weak. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | components/autofill/ios/browser/form_suggestion.mm » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "base/ios/crb_protocol_observers.h" 5 #import "base/ios/crb_protocol_observers.h"
6 #include "base/ios/weak_nsobject.h" 6 #include "base/ios/weak_nsobject.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/scoped_nsautorelease_pool.h" 8 #include "base/mac/scoped_nsautorelease_pool.h"
9 #include "base/mac/scoped_nsobject.h" 9 #include "base/mac/scoped_nsobject.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 } 248 }
249 249
250 - (void)reset { 250 - (void)reset {
251 [super reset]; 251 [super reset];
252 _optionalMethodInvoked = NO; 252 _optionalMethodInvoked = NO;
253 } 253 }
254 254
255 @end 255 @end
256 256
257 @implementation TestMutateObserver { 257 @implementation TestMutateObserver {
258 __weak id _observers; 258 id _observers; // weak
259 } 259 }
260 260
261 - (instancetype)initWithObserver:(CRBProtocolObservers*)observers { 261 - (instancetype)initWithObserver:(CRBProtocolObservers*)observers {
262 self = [super init]; 262 self = [super init];
263 if (self) { 263 if (self) {
264 _observers = observers; 264 _observers = observers;
265 } 265 }
266 return self; 266 return self;
267 } 267 }
268 268
(...skipping 12 matching lines...) Expand all
281 281
282 - (void)nestedMutateByAddingObserver:(id<TestObserver>)observer { 282 - (void)nestedMutateByAddingObserver:(id<TestObserver>)observer {
283 [_observers mutateByAddingObserver:observer]; 283 [_observers mutateByAddingObserver:observer];
284 } 284 }
285 285
286 - (void)nestedMutateByRemovingObserver:(id<TestObserver>)observer { 286 - (void)nestedMutateByRemovingObserver:(id<TestObserver>)observer {
287 [_observers mutateByRemovingObserver:observer]; 287 [_observers mutateByRemovingObserver:observer];
288 } 288 }
289 289
290 @end 290 @end
OLDNEW
« no previous file with comments | « no previous file | components/autofill/ios/browser/form_suggestion.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698