Commit 31e1eb47 authored by beidson@apple.com's avatar beidson@apple.com
Browse files

2008-10-29 Brady Eidson <beidson@apple.com>

        Reviewed by Sam Weinig

        https://bugs.webkit.org/show_bug.cgi?id=21952
        
        Address an outstanding FIXME by removing unused SPI

        * History/WebHistory.mm:
        (-[WebHistory _addItemForURL:title:]): Fold addItem: into this method

        * History/WebHistoryPrivate.h: Removed unused/unneccessary SPI



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37975 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent dc065f3d
2008-10-29 Brady Eidson <beidson@apple.com>
Reviewed by Sam Weinig
https://bugs.webkit.org/show_bug.cgi?id=21952
Address an outstanding FIXME by removing unused SPI
* History/WebHistory.mm:
(-[WebHistory _addItemForURL:title:]): Fold addItem: into this method
* History/WebHistoryPrivate.h: Removed unused/unneccessary SPI
2008-10-28 Justin Garcia <justin.garcia@apple.com>
Reviewed by Darin Adler.
......
......@@ -81,7 +81,6 @@ NSString *DatesArrayKey = @"WebHistoryDates";
- (NSArray *)orderedLastVisitedDays;
- (NSArray *)orderedItemsLastVisitedOnDay:(NSCalendarDate *)calendarDate;
- (BOOL)containsURL:(NSURL *)URL;
- (BOOL)containsItemForURLString:(NSString *)URLString;
- (WebHistoryItem *)itemForURL:(NSURL *)URL;
- (WebHistoryItem *)itemForURLString:(NSString *)URLString;
......@@ -398,11 +397,6 @@ WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
return [_entriesByURL objectForKey:URLString];
}
- (BOOL)containsItemForURLString:(NSString *)URLString
{
return [self itemForURLString:URLString] != nil;
}
- (BOOL)containsURL:(NSURL *)URL
{
return [self itemForURLString:[URL _web_originalDataAsString]] != nil;
......@@ -779,46 +773,6 @@ WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
@implementation WebHistory (WebPrivate)
- (void)addItem:(WebHistoryItem *)entry
{
LOG(History, "adding %@", entry);
[_historyPrivate addItem:entry];
[self _sendNotification:WebHistoryItemsAddedNotification
entries:[NSArray arrayWithObject:entry]];
}
- (WebHistoryItem *)addItemForURL:(NSURL *)URL
{
WebHistoryItem *entry = [[WebHistoryItem alloc] initWithURL:URL title:nil];
[entry _setLastVisitedTimeInterval:[NSDate timeIntervalSinceReferenceDate]];
[self addItem:entry];
[entry release];
return entry;
}
- (NSCalendarDate *)ageLimitDate
{
return [_historyPrivate ageLimitDate];
}
- (BOOL)containsItemForURLString:(NSString *)URLString
{
return [_historyPrivate containsItemForURLString:URLString];
}
- (void)removeItem:(WebHistoryItem *)entry
{
if ([_historyPrivate removeItem:entry]) {
[self _sendNotification:WebHistoryItemsRemovedNotification
entries:[NSArray arrayWithObject:entry]];
}
}
- (void)setLastVisitedTimeInterval:(NSTimeInterval)time forItem:(WebHistoryItem *)entry
{
[_historyPrivate setLastVisitedTimeInterval:time forItem:entry];
}
- (WebHistoryItem *)_itemForURLString:(NSString *)URLString
{
return [_historyPrivate itemForURLString:URLString];
......@@ -832,7 +786,12 @@ WebHistoryDateKey timeIntervalForBeginningOfDay(NSTimeInterval interval)
{
WebHistoryItem *entry = [[WebHistoryItem alloc] initWithURL:URL title:title];
[entry _setLastVisitedTimeInterval:[NSDate timeIntervalSinceReferenceDate]];
[self addItem:entry];
LOG(History, "adding %@", entry);
[_historyPrivate addItem:entry];
[self _sendNotification:WebHistoryItemsAddedNotification
entries:[NSArray arrayWithObject:entry]];
[entry release];
}
......
......@@ -41,12 +41,4 @@ extern NSString *WebHistoryItemsDiscardedWhileLoadingNotification;
// FIXME: The following SPI is used by Safari. Should it be made into public API?
- (WebHistoryItem *)_itemForURLString:(NSString *)URLString;
// FIXME: neither Safari nor WebKit use the following SPI -- do we still need them?
- (void)addItem:(WebHistoryItem *)entry;
- (WebHistoryItem *)addItemForURL:(NSURL *)URL;
- (NSCalendarDate *)ageLimitDate;
- (BOOL)containsItemForURLString:(NSString *)URLString;
- (void)removeItem:(WebHistoryItem *)entry;
- (void)setLastVisitedTimeInterval:(NSTimeInterval)time forItem:(WebHistoryItem *)item;
@end
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment