API tests using permanent credentials should clear credentials left by previous tests
[WebKit-https.git] / Source / WebCore / platform / network / CredentialStorage.cpp
index 98e9426..26a3b9e 100644 (file)
@@ -102,9 +102,9 @@ void CredentialStorage::removeCredentialsWithOrigin(const SecurityOriginData& or
         remove(key.first, key.second);
 }
 
-Vector<SecurityOriginData> CredentialStorage::originsWithCredentials() const
+HashSet<SecurityOriginData> CredentialStorage::originsWithCredentials() const
 {
-    Vector<SecurityOriginData> origins;
+    HashSet<SecurityOriginData> origins;
     for (auto& keyValuePair : m_protectionSpaceToCredentialMap) {
         auto& protectionSpace = keyValuePair.key.second;
         if (protectionSpace.isProxy())
@@ -129,7 +129,7 @@ Vector<SecurityOriginData> CredentialStorage::originsWithCredentials() const
         }
 
         SecurityOriginData origin { protocol, protectionSpace.host(), static_cast<uint16_t>(protectionSpace.port())};
-        origins.append(WTFMove(origin));
+        origins.add(WTFMove(origin));
     }
     return origins;
 }
@@ -187,4 +187,19 @@ void CredentialStorage::clearCredentials()
     m_pathToDefaultProtectionSpaceMap.clear();
 }
 
+#if !PLATFORM(COCOA)
+HashSet<SecurityOriginData> CredentialStorage::originsWithSessionCredentials()
+{
+    return { };
+}
+
+void CredentialStorage::removeSessionCredentialsWithOrigins(const Vector<SecurityOriginData>&)
+{
+}
+
+void CredentialStorage::clearSessionCredentials()
+{
+}
+#endif
+
 } // namespace WebCore