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

Unified Diff: ios/web/crw_browsing_data_store_unittest.mm

Issue 1215433003: CL for Objective-C readability (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: y Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
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 {

Powered by Google App Engine
This is Rietveld 408576698