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

Unified Diff: ios/web/navigation/crw_session_controller.mm

Issue 2722013002: Use custom user data to serialize Tab last visited timestamp. (Closed)
Patch Set: Rebase. Created 3 years, 10 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/navigation/crw_session_controller.h ('k') | ios/web/navigation/crw_session_storage_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/navigation/crw_session_controller.mm
diff --git a/ios/web/navigation/crw_session_controller.mm b/ios/web/navigation/crw_session_controller.mm
index 295fadf8a1fa0c8b569f9f1dc9d76b0d9ba2a602..ca244ef94b99814bda5c65a1ae3e7f8c14b5d1e7 100644
--- a/ios/web/navigation/crw_session_controller.mm
+++ b/ios/web/navigation/crw_session_controller.mm
@@ -62,10 +62,6 @@
// Stores the certificate policies decided by the user.
CRWSessionCertificatePolicyManager* _sessionCertificatePolicyManager;
- // The timestamp of the last time this tab is visited, represented in time
- // interval since 1970.
- NSTimeInterval _lastVisitedTimestamp;
-
// The browser state associated with this CRWSessionController;
web::BrowserState* _browserState; // weak
@@ -112,7 +108,6 @@
@synthesize previousNavigationIndex = _previousNavigationIndex;
@synthesize pendingItemIndex = _pendingItemIndex;
@synthesize entries = _entries;
-@synthesize lastVisitedTimestamp = _lastVisitedTimestamp;
@synthesize openedByDOM = _openedByDOM;
@synthesize sessionCertificatePolicyManager = _sessionCertificatePolicyManager;
@@ -123,7 +118,6 @@
_openedByDOM = openedByDOM;
_browserState = browserState;
_entries = [NSMutableArray array];
- _lastVisitedTimestamp = [[NSDate date] timeIntervalSince1970];
_currentNavigationIndex = -1;
_previousNavigationIndex = -1;
_pendingItemIndex = -1;
@@ -156,7 +150,6 @@
}
_previousNavigationIndex = -1;
_pendingItemIndex = -1;
- _lastVisitedTimestamp = [[NSDate date] timeIntervalSince1970];
_sessionCertificatePolicyManager =
[[CRWSessionCertificatePolicyManager alloc] init];
}
@@ -169,7 +162,6 @@
copy->_currentNavigationIndex = _currentNavigationIndex;
copy->_previousNavigationIndex = _previousNavigationIndex;
copy->_pendingItemIndex = _pendingItemIndex;
- copy->_lastVisitedTimestamp = _lastVisitedTimestamp;
copy->_entries =
[[NSMutableArray alloc] initWithArray:_entries copyItems:YES];
copy->_sessionCertificatePolicyManager =
@@ -214,14 +206,14 @@
}
- (NSString*)description {
- return [NSString
- stringWithFormat:@"last visit: %f\ncurrent index: %" PRIdNS
- @"\nprevious index: %" PRIdNS
- @"\npending index: %" PRIdNS
- @"\n%@\npending: %@\ntransient: %@\n",
- _lastVisitedTimestamp, _currentNavigationIndex,
- _previousNavigationIndex, _pendingItemIndex, _entries,
- _pendingEntry.get(), _transientEntry.get()];
+ return [NSString stringWithFormat:@"current index: %" PRIdNS
+ @"\nprevious index: %" PRIdNS
+ @"\npending index: %" PRIdNS
+ @"\n%@\npending: %@\ntransient: %@\n",
+ _currentNavigationIndex,
+ _previousNavigationIndex, _pendingItemIndex,
+ _entries, _pendingEntry.get(),
+ _transientEntry.get()];
}
- (web::NavigationItemList)items {
« no previous file with comments | « ios/web/navigation/crw_session_controller.h ('k') | ios/web/navigation/crw_session_storage_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698