Chromium Code Reviews| Index: ios/web/crw_browsing_data_store_unittest.mm |
| diff --git a/ios/web/crw_browsing_data_store_unittest.mm b/ios/web/crw_browsing_data_store_unittest.mm |
| index d4099adcc376251a79a1057eeb17d4dbb48d995d..7d8c4712f6588b85e35b7987272a6bd184080ecd 100644 |
| --- a/ios/web/crw_browsing_data_store_unittest.mm |
| +++ b/ios/web/crw_browsing_data_store_unittest.mm |
| @@ -19,13 +19,14 @@ |
| // An observer to observe the |mode| key changes to a CRWBrowsingDataStore. |
| // Used for testing purposes. |
| @interface CRWTestBrowsingDataStoreObserver : NSObject |
| -// Designated init. |browsingDataStore| cannot be null. |
| -- (instancetype)initWithBrowsingDataStore: |
| - (CRWBrowsingDataStore*)browsingDataStore NS_DESIGNATED_INITIALIZER; |
| -- (instancetype)init NS_UNAVAILABLE; |
| // The number of times that the mode of the underlying CRWBrowsingDataStore |
| // changed. |
| @property(nonatomic, assign) NSUInteger modeChangeCount; |
| + |
| +// Designated init. |browsingDataStore| cannot be null. |
|
stuartmorgan
2015/07/09 16:33:50
No need to comment that it's the designated initia
shreyasv1
2015/07/09 17:18:01
Done.
|
| +- (instancetype)initWithBrowsingDataStore: |
| + (CRWBrowsingDataStore*)browsingDataStore NS_DESIGNATED_INITIALIZER; |
| +- (instancetype)init NS_UNAVAILABLE; |
| @end |
| @implementation CRWTestBrowsingDataStoreObserver { |
| @@ -36,7 +37,7 @@ |
| @synthesize modeChangeCount = _modeChangeCount; |
| - (instancetype)initWithBrowsingDataStore: |
| - (CRWBrowsingDataStore*)browsingDataStore { |
| + (CRWBrowsingDataStore*)browsingDataStore { |
| self = [super init]; |
| if (self) { |
| DCHECK(browsingDataStore); |
| @@ -54,6 +55,11 @@ |
| return nil; |
| } |
| +- (void)dealloc { |
| + [_browsingDataStore removeObserver:self forKeyPath:@"mode"]; |
| + [super dealloc]; |
| +} |
| + |
| - (void)observeValueForKeyPath:(NSString*)keyPath |
| ofObject:(id)object |
| change:(NSDictionary*)change |
| @@ -64,11 +70,6 @@ |
| ++self.modeChangeCount; |
| } |
| -- (void)dealloc { |
| - [_browsingDataStore removeObserver:self forKeyPath:@"mode"]; |
| - [super dealloc]; |
| -} |
| - |
| @end |
| namespace web { |