Add files

This commit is contained in:
seven332 committed 2016-01-26 01:03:31 +08:00
1 parent 217c81a6d1
commit d1650c4ec5
297 files changed
+105101 -116

No files matched your search

@@ -100,6 +100,18 @@ public class CookieDBStore implements CookieJar {
}
}
private synchronized void removeInternal(String domain) {
// Remove all cookies of the domain from map
List<CookieWithID> cookies = map.remove(domain);
if (cookies != null) {
for (CookieWithID cwi : cookies) {
// Remove from DB
CookieDB.removeCookie(cwi.id);
}
cookies.clear();
}
}
private synchronized void addInternal(String domain, Cookie cookie) {
// Check expired
if (hasExpired(cookie)) {
@@ -134,6 +146,10 @@ public class CookieDBStore implements CookieJar {
removeInternal(CookieDB.cookiesDomain(url), name);
}
public void remove(String url) {
removeInternal(CookieDB.cookiesDomain(url));
}
public void add(Cookie cookie) {
addInternal(CookieDB.cookiesDomain(cookie.domain()), cookie);
}