Changeset 185428 in webkit
- Timestamp:
- Jun 10, 2015, 1:47:15 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
UIProcess/WebsiteData/WebsiteDataStore.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r185420 r185428 1 2015-06-10 Brent Fulgham <bfulgham@apple.com> 2 3 [WK2] Do not indicate Media Keys are present when they are not 4 https://bugs.webkit.org/show_bug.cgi?id=145713 5 <rdar://problem/19752566> 6 7 Reviewed by Dean Jackson. 8 9 Correct the reporting of Media Key presence by checking for the actual 10 media key file, not just the directory. Sometimes the directory will exist 11 with no media key files (e.g., if a user navigates to the directory using 12 the Finder). 13 14 * UIProcess/WebsiteData/WebsiteDataStore.cpp: 15 (WebKit::computeMediaKeyFile): Moved earlier in file so it could be used by 16 the 'mediaKeyOrigins' method. 17 (WebKit::WebsiteDataStore::mediaKeyOrigins): Only indicate we have a media key 18 origin if the folder actually contains the media key file. 19 (WebKit::WebsiteDataStore::removeMediaKeys): Use the existing 'computeMediaKeyFile', 20 rather than manually building the file from strings. 21 1 22 2015-06-09 Anders Carlsson <andersca@apple.com> 2 23 -
trunk/Source/WebKit2/UIProcess/WebsiteData/WebsiteDataStore.cpp
r185420 r185428 895 895 #endif 896 896 897 static String computeMediaKeyFile(const String& mediaKeyDirectory) 898 { 899 return WebCore::pathByAppendingComponent(mediaKeyDirectory, "SecureStop.plist"); 900 } 901 897 902 Vector<RefPtr<WebCore::SecurityOrigin>> WebsiteDataStore::mediaKeyOrigins(const String& mediaKeysStorageDirectory) 898 903 { … … 902 907 903 908 for (const auto& originPath : WebCore::listDirectory(mediaKeysStorageDirectory, "*")) { 909 auto mediaKeyFile = computeMediaKeyFile(originPath); 910 if (!WebCore::fileExists(mediaKeyFile)) 911 continue; 912 904 913 auto mediaKeyIdentifier = WebCore::pathGetFileName(originPath); 905 914 … … 909 918 910 919 return origins; 911 }912 913 static String computeMediaKeyFile(const String& mediaKeyDirectory)914 {915 return WebCore::pathByAppendingComponent(mediaKeyDirectory, "SecureStop.plist");916 920 } 917 921 … … 941 945 for (const auto& origin : origins) { 942 946 auto mediaKeyDirectory = WebCore::pathByAppendingComponent(mediaKeysStorageDirectory, origin->databaseIdentifier()); 943 auto mediaKeyFile = WebCore::pathByAppendingComponent(mediaKeyDirectory, "SecureStop.plist");947 auto mediaKeyFile = computeMediaKeyFile(mediaKeyDirectory); 944 948 945 949 WebCore::deleteFile(mediaKeyFile);
Note:
See TracChangeset
for help on using the changeset viewer.