+2006-08-25 Brady Eidson <beidson@apple.com>
+
+ Reviewed by Adam
+
+ Changed some time()-related code to be more platform independent
+
+ * loader/icon/IconDatabase.cpp:
+ (WebCore::IconDatabase::isIconExpiredForIconURL):
+ (WebCore::IconDatabase::getOrCreateIconDataCache):
+ (WebCore::IconDatabase::setIconDataForIconURL):
+
2006-08-25 David Harrison <harrison@apple.com>
Reviewed by Geoff.
// If we have a IconDataCache, then it definitely has the Timestamp in it
IconDataCache* icon = m_iconURLToIconDataCacheMap.get(iconURL);
if (icon)
- return time(NULL) - icon->getTimestamp() > iconExpirationTime;
+ return (int)currentTime() - icon->getTimestamp() > iconExpirationTime;
// Otherwise, we'll get the timestamp from the DB and use it
int stamp;
if (m_privateBrowsingEnabled) {
stamp = timeStampForIconURLQuery(m_privateBrowsingDB, iconURL);
if (stamp)
- return (time(NULL) - stamp) > iconExpirationTime;
+ return ((int)currentTime() - stamp) > iconExpirationTime;
}
stamp = timeStampForIconURLQuery(m_mainDB, iconURL);
if (stamp)
- return (time(NULL) - stamp) > iconExpirationTime;
+ return ((int)currentTime() - stamp) > iconExpirationTime;
return false;
}
// If we can't get a timestamp for this URL, then it is a new icon and we initialize its timestamp now
if (!timestamp) {
- icon->setTimestamp(time(NULL));
+ icon->setTimestamp((int)currentTime());
m_iconDataCachesPendingUpdate.add(icon);
} else
icon->setTimestamp(timestamp);
icon->setImageData((unsigned char*)data, size);
// Update the timestamp in the IconDataCache to NOW
- icon->setTimestamp(time(NULL));
+ icon->setTimestamp((int)currentTime());
// Mark the IconDataCache as requiring an update to the database
m_iconDataCachesPendingUpdate.add(icon);