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

Unified Diff: ios/web/public/crw_navigation_manager_storage.mm

Issue 2664113003: Moved serialization out of CRWSessionEntry. (Closed)
Patch Set: Eugene's comments Created 3 years, 11 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
« no previous file with comments | « ios/web/public/crw_navigation_manager_storage.h ('k') | ios/web/public/navigation_item.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/crw_navigation_manager_storage.mm
diff --git a/ios/web/public/crw_navigation_manager_storage.mm b/ios/web/public/crw_navigation_manager_storage.mm
index 18fce137bf6d5b5fed5a19d891e6802dd7ee7941..8f77b0955b3fc0a0082207f6777f18fd2b35e1f7 100644
--- a/ios/web/public/crw_navigation_manager_storage.mm
+++ b/ios/web/public/crw_navigation_manager_storage.mm
@@ -14,7 +14,7 @@
// Serialization keys used in NSCoding functions.
NSString* const kCertificatePolicyManagerKey = @"certificatePolicyManager";
NSString* const kCurrentNavigationIndexKey = @"currentNavigationIndex";
-NSString* const kEntriesKey = @"entries";
+NSString* const kItemStoragesKey = @"entries";
NSString* const kLastVisitedTimestampKey = @"lastVisitedTimestamp";
NSString* const kOpenerIDKey = @"openerId";
NSString* const kOpenedByDOMKey = @"openedByDOM";
@@ -34,7 +34,7 @@ @implementation CRWNavigationManagerStorage
@synthesize currentNavigationIndex = _currentNavigationIndex;
@synthesize previousNavigationIndex = _previousNavigationIndex;
@synthesize lastVisitedTimestamp = _lastVisitedTimestamp;
-@synthesize entries = _entries;
+@synthesize itemStorages = _itemStorages;
@synthesize sessionCertificatePolicyManager = _sessionCertificatePolicyManager;
- (instancetype)initWithCoder:(nonnull NSCoder*)decoder {
@@ -52,10 +52,10 @@ - (instancetype)initWithCoder:(nonnull NSCoder*)decoder {
[decoder decodeIntForKey:kPreviousNavigationIndexKey];
_lastVisitedTimestamp =
[decoder decodeDoubleForKey:kLastVisitedTimestampKey];
- _entries = [[NSMutableArray alloc]
- initWithArray:[decoder decodeObjectForKey:kEntriesKey]];
+ _itemStorages = [[NSMutableArray alloc]
+ initWithArray:[decoder decodeObjectForKey:kItemStoragesKey]];
// Prior to M34, 0 was used as "no index" instead of -1; adjust for that.
- if (!_entries.count)
+ if (!_itemStorages.count)
_currentNavigationIndex = -1;
_sessionCertificatePolicyManager =
[decoder decodeObjectForKey:kCertificatePolicyManagerKey];
@@ -79,7 +79,7 @@ - (void)encodeWithCoder:(NSCoder*)coder {
forKey:kPreviousNavigationIndexKey];
[coder encodeDouble:self.lastVisitedTimestamp
forKey:kLastVisitedTimestampKey];
- [coder encodeObject:self.entries forKey:kEntriesKey];
+ [coder encodeObject:self.itemStorages forKey:kItemStoragesKey];
[coder encodeObject:self.sessionCertificatePolicyManager
forKey:kCertificatePolicyManagerKey];
// rendererInitiated is deliberately not preserved, as upstream.
« no previous file with comments | « ios/web/public/crw_navigation_manager_storage.h ('k') | ios/web/public/navigation_item.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698