Simplify CookieMonster::SetAllCookies{,Async}() implementation.
Given that for now the call must remain present but the precise semantics
of the call aren't important (see
https://codereview.chromium.org/2882063002/#msg64), it's worthwhile having
as clean and simple an implementation of reasonable semantics as possible.
BUG=None
[email protected]
Review-Url: https://codereview.chromium.org/2974363002
Cr-Commit-Position: refs/heads/master@{#486248}
diff --git a/net/cookies/cookie_monster.h b/net/cookies/cookie_monster.h
index fe968dba..717059e7 100644
--- a/net/cookies/cookie_monster.h
+++ b/net/cookies/cookie_monster.h
@@ -149,8 +149,8 @@
~CookieMonster() override;
- // Writes all the cookies in |list| into the store, replacing existing
- // cookies that collide. Does not affect cookies not listed in |list|.
+ // Writes all the cookies in |list| into the store, replacing all cookies
+ // currently present in store.
// This method does not flush the backend.
// TODO(rdsmith, mmenke): Do not use this function; it is deprecated
// and should be removed.
@@ -255,9 +255,6 @@
// For FindCookiesForKey.
FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest, ShortLivedSessionCookies);
- // For ComputeCookieDiff.
- FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest, ComputeCookieDiff);
-
// For CookieSource histogram enum.
FRIEND_TEST_ALL_PREFIXES(CookieMonsterTest, CookieSourceHistogram);
@@ -638,16 +635,6 @@
// given URL are loaded.
void DoCookieCallbackForURL(base::OnceClosure callback, const GURL& url);
- // Computes the difference between |old_cookies| and |new_cookies|, and writes
- // the result in |cookies_to_add| and |cookies_to_delete|.
- // This function has the side effect of changing the order of |old_cookies|
- // and |new_cookies|. |cookies_to_add| and |cookies_to_delete| must be empty,
- // and none of the arguments can be null.
- void ComputeCookieDiff(CookieList* old_cookies,
- CookieList* new_cookies,
- CookieList* cookies_to_add,
- CookieList* cookies_to_delete);
-
// Run all cookie changed callbacks that are monitoring |cookie|.
// |removed| is true if the cookie was deleted.
void RunCookieChangedCallbacks(const CanonicalCookie& cookie,