diff options
author | tburkard@chromium.org <tburkard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-13 08:19:59 +0000 |
---|---|---|
committer | tburkard@chromium.org <tburkard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-13 08:19:59 +0000 |
commit | 28c5d0b7a83b11685698c5cd2ffb04c91d75a0c6 (patch) | |
tree | 949ca1fb18b48a01675ce6f62ecb0943a15bb292 /net/cookies/canonical_cookie.h | |
parent | f73e1ca075924a6ca1125d5d7f96e374532852c3 (diff) | |
download | chromium_src-28c5d0b7a83b11685698c5cd2ffb04c91d75a0c6.zip chromium_src-28c5d0b7a83b11685698c5cd2ffb04c91d75a0c6.tar.gz chromium_src-28c5d0b7a83b11685698c5cd2ffb04c91d75a0c6.tar.bz2 |
Only commit cookie changes in prerenders after a prerender is shown
Will create a PrerenderCookieStore for each prerender, retaining all cookie
operations of a prerender until the prerender is shown to the user.
Forces prerenders to be in a new render process by themselves for this to work.
This is a resubmission of https://codereview.chromium.org/233353003, which had
to be reverted due to build breaks. See LGTM's there.
BUG=371003
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/280403002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@270049 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/cookies/canonical_cookie.h')
-rw-r--r-- | net/cookies/canonical_cookie.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/cookies/canonical_cookie.h b/net/cookies/canonical_cookie.h index a78eece..a556740 100644 --- a/net/cookies/canonical_cookie.h +++ b/net/cookies/canonical_cookie.h @@ -125,6 +125,9 @@ class NET_EXPORT CanonicalCookie { std::string DebugString() const; + // Returns a duplicate of this cookie. + CanonicalCookie* Duplicate(); + // Returns the cookie source when cookies are set for |url|. This function // is public for unit test purposes only. static std::string GetCookieSourceFromURL(const GURL& url); @@ -134,6 +137,9 @@ class NET_EXPORT CanonicalCookie { const base::Time& server_time); private: + // NOTE: When any new members are added below, the implementation of + // Duplicate() must be updated to copy the new member accordingly. + // The source member of a canonical cookie is the origin of the URL that tried // to set this cookie, minus the port number if any. This field is not // persistent though; its only used in the in-tab cookies dialog to show the @@ -153,6 +159,9 @@ class NET_EXPORT CanonicalCookie { bool secure_; bool httponly_; CookiePriority priority_; + // NOTE: When any new members are added above this comment, the + // implementation of Duplicate() must be updated to copy the new member + // accordingly. }; typedef std::vector<CanonicalCookie> CookieList; |