Changeset 182983 in webkit
- Timestamp:
- Apr 18, 2015, 7:42:08 AM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r182980 r182983 1 2015-04-18 Chris Dumez <cdumez@apple.com> 2 3 Fix NetworkCache Statistics database bootstrapping after r182803 4 https://bugs.webkit.org/show_bug.cgi?id=143890 5 6 Reviewed by Darin Adler. 7 8 Update the NetworkCache Statistics database bootstrapping code to use 9 the records path instead of the version path. Also check that the 10 filenames in the folder are valid hashes to discard the *-body files. 11 12 * NetworkProcess/cache/NetworkCache.cpp: 13 (WebKit::NetworkCache::Cache::recordsPath): 14 (WebKit::NetworkCache::Cache::storagePath): Deleted. 15 * NetworkProcess/cache/NetworkCache.h: 16 * NetworkProcess/cache/NetworkCacheStatistics.cpp: 17 (WebKit::NetworkCache::Statistics::initialize): 18 (WebKit::NetworkCache::Statistics::bootstrapFromNetworkCache): 19 (WebKit::NetworkCache::Statistics::shrinkIfNeeded): 20 1 21 2015-04-17 Tim Horton <timothy_horton@apple.com> 2 22 -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp
r182841 r182983 498 498 } 499 499 500 String Cache:: storagePath() const501 { 502 return m_storage ? m_storage-> versionPath() : String();503 } 504 505 } 506 } 507 508 #endif 500 String Cache::recordsPath() const 501 { 502 return m_storage ? m_storage->recordsPath() : String(); 503 } 504 505 } 506 } 507 508 #endif -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCache.h
r182361 r182983 104 104 void dumpContentsToFile(); 105 105 106 String storagePath() const;106 String recordsPath() const; 107 107 108 108 private: -
trunk/Source/WebKit2/NetworkProcess/cache/NetworkCacheStatistics.cpp
r182365 r182983 96 96 97 97 StringCapture databasePathCapture(databasePath); 98 StringCapture networkCachePathCapture(singleton(). storagePath());98 StringCapture networkCachePathCapture(singleton().recordsPath()); 99 99 serialBackgroundIOQueue().dispatch([this, databasePathCapture, networkCachePathCapture, startTime] { 100 100 WebCore::SQLiteTransactionInProgressAutoCounter transactionCounter; … … 145 145 146 146 Vector<StringCapture> hashes; 147 traverseCacheFiles(networkCachePath, [&hashes](const String& hash, const String&) { 148 hashes.append(hash); 147 traverseCacheFiles(networkCachePath, [&hashes](const String& hashString, const String&) { 148 Key::HashType hash; 149 if (!Key::stringToHash(hashString, hash)) 150 return; 151 152 hashes.append(hashString); 149 153 }); 150 154 … … 170 174 clear(); 171 175 172 StringCapture networkCachePathCapture(singleton(). storagePath());176 StringCapture networkCachePathCapture(singleton().recordsPath()); 173 177 serialBackgroundIOQueue().dispatch([this, networkCachePathCapture] { 174 178 bootstrapFromNetworkCache(networkCachePathCapture.string());
Note:
See TracChangeset
for help on using the changeset viewer.