Changeset 24117 in webkit
- Timestamp:
- Jul 9, 2007 10:45:08 AM (17 years ago)
- Location:
- trunk/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit/ChangeLog
r24101 r24117 1 2007-07-09 John Sullivan <sullivan@apple.com> 2 3 Reviewed by Darin 4 5 - fixed <rdar://problem/5320208> WebKit should prevent Time Machine from backing up WebKit clients' icon databases 6 7 * Misc/WebIconDatabase.mm: 8 (-[WebIconDatabase init]): 9 Re-added the code to exclude the icon database from backups. We now do this at the same time we (try to) import 10 the old icon database format, which happens only once per icon database's lifetime. 11 (-[WebIconDatabase _importToWebCoreFormat]): 12 Assert that we haven't imported yet rather than bailing out. It's now the caller's responsibility to check 13 whether we've imported yet. 14 1 15 2007-07-08 John Sullivan <sullivan@apple.com> 2 16 -
trunk/WebKit/Misc/WebIconDatabase.mm
r24101 r24117 125 125 if (!iconDatabase()->open(databaseDirectory)) 126 126 LOG_ERROR("Unable to open icon database"); 127 else { 128 if ([self _isEnabled]) 129 [self _importToWebCoreFormat]; 127 else if ([self _isEnabled] && !iconDatabase()->imported()) { 128 [self _importToWebCoreFormat]; 129 130 #ifndef BUILDING_ON_TIGER 131 // Tell backup software (i.e., Time Machine) to never back up the icon database, because 132 // it's a large file that changes frequently, thus using a lot of backup disk space, and 133 // it's unlikely that many users would be upset about it not being backed up. We do this 134 // here because this code is only executed once for each icon database instance. We could 135 // make this configurable on a per-client basis someday if that seemed useful. 136 // See <rdar://problem/5320208>. 137 CFStringRef databasePath = iconDatabase()->databasePath().createCFString(); 138 CFURLRef databasePathURL = CFURLCreateWithFileSystemPath(0, databasePath, kCFURLPOSIXPathStyle, FALSE); 139 CFRelease(databasePath); 140 CSBackupSetItemExcluded(databasePathURL, true, true); 141 CFRelease(databasePathURL); 142 #endif 130 143 } 131 144 … … 497 510 - (void)_importToWebCoreFormat 498 511 { 499 ASSERT(_private); 500 501 // If we've already performed the import once we shouldn't try to do it again 502 if (iconDatabase()->imported()) 503 return; 512 ASSERT(_private); 513 514 // If we've already performed the import once we shouldn't be trying to do it again 515 ASSERT(!iconDatabase()->imported()); 504 516 505 517 // Get the directory the old icon database *should* be in
Note: See TracChangeset
for help on using the changeset viewer.