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

Side by Side Diff: ios/web/crw_browsing_data_store_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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "ios/web/public/crw_browsing_data_store.h" 5 #import "ios/web/public/crw_browsing_data_store.h"
6 6
7 #include "base/ios/ios_util.h" 7 #include "base/ios/ios_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #import "base/mac/scoped_nsobject.h" 9 #import "base/mac/scoped_nsobject.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 14 matching lines...) Expand all
25 @property(nonatomic, assign) NSUInteger modeChangeCount; 25 @property(nonatomic, assign) NSUInteger modeChangeCount;
26 26
27 // |browsingDataStore| cannot be null. 27 // |browsingDataStore| cannot be null.
28 - (instancetype)initWithBrowsingDataStore: 28 - (instancetype)initWithBrowsingDataStore:
29 (CRWBrowsingDataStore*)browsingDataStore NS_DESIGNATED_INITIALIZER; 29 (CRWBrowsingDataStore*)browsingDataStore NS_DESIGNATED_INITIALIZER;
30 - (instancetype)init NS_UNAVAILABLE; 30 - (instancetype)init NS_UNAVAILABLE;
31 @end 31 @end
32 32
33 @implementation CRWTestBrowsingDataStoreObserver { 33 @implementation CRWTestBrowsingDataStoreObserver {
34 // The underlying CRWBrowsingDataStore. 34 // The underlying CRWBrowsingDataStore.
35 __weak CRWBrowsingDataStore* _browsingDataStore; 35 CRWBrowsingDataStore* _browsingDataStore; // weak
36 } 36 }
37 37
38 @synthesize modeChangeCount = _modeChangeCount; 38 @synthesize modeChangeCount = _modeChangeCount;
39 39
40 - (instancetype)initWithBrowsingDataStore: 40 - (instancetype)initWithBrowsingDataStore:
41 (CRWBrowsingDataStore*)browsingDataStore { 41 (CRWBrowsingDataStore*)browsingDataStore {
42 self = [super init]; 42 self = [super init];
43 if (self) { 43 if (self) {
44 DCHECK(browsingDataStore); 44 DCHECK(browsingDataStore);
45 [browsingDataStore addObserver:self 45 [browsingDataStore addObserver:self
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 ASSERT_EQ(ACTIVE, [browsing_data_store_ mode]); 241 ASSERT_EQ(ACTIVE, [browsing_data_store_ mode]);
242 242
243 [browsing_data_store_ makeInactiveWithCompletionHandler:nil]; 243 [browsing_data_store_ makeInactiveWithCompletionHandler:nil];
244 // |removeDataOfTypes| is called immediately after a |makeInactive| call. 244 // |removeDataOfTypes| is called immediately after a |makeInactive| call.
245 RemoveDataOfTypes(BROWSING_DATA_TYPE_COOKIES); 245 RemoveDataOfTypes(BROWSING_DATA_TYPE_COOKIES);
246 EXPECT_EQ(INACTIVE, [browsing_data_store_ mode]); 246 EXPECT_EQ(INACTIVE, [browsing_data_store_ mode]);
247 } 247 }
248 248
249 } // namespace web 249 } // namespace web
OLDNEW
« no previous file with comments | « ios/net/crn_http_protocol_handler_proxy_with_client_thread.mm ('k') | ios/web/navigation/crw_session_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698