| 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..4fd5b41abf60f163038f168bb37444005b74682b 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;
|
| +
|
| +// |browsingDataStore| cannot be null.
|
| +- (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);
|
| @@ -49,9 +50,9 @@
|
| return self;
|
| }
|
|
|
| -- (instancetype)init {
|
| - NOTREACHED();
|
| - return nil;
|
| +- (void)dealloc {
|
| + [_browsingDataStore removeObserver:self forKeyPath:@"mode"];
|
| + [super dealloc];
|
| }
|
|
|
| - (void)observeValueForKeyPath:(NSString*)keyPath
|
| @@ -64,11 +65,6 @@
|
| ++self.modeChangeCount;
|
| }
|
|
|
| -- (void)dealloc {
|
| - [_browsingDataStore removeObserver:self forKeyPath:@"mode"];
|
| - [super dealloc];
|
| -}
|
| -
|
| @end
|
|
|
| namespace web {
|
|
|