Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1565)

Side by Side Diff: net/cookies/canonical_cookie.h

Issue 233353003: Only commit cookie changes in prerenders after a prerender is shown (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Add browser tests, fix a bug in what was changed yesterday. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_COOKIES_CANONICAL_COOKIE_H_ 5 #ifndef NET_COOKIES_CANONICAL_COOKIE_H_
6 #define NET_COOKIES_CANONICAL_COOKIE_H_ 6 #define NET_COOKIES_CANONICAL_COOKIE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 118
119 // Returns true if the cookie should be included for the given request |url|. 119 // Returns true if the cookie should be included for the given request |url|.
120 // HTTP only cookies can be filter by using appropriate cookie |options|. 120 // HTTP only cookies can be filter by using appropriate cookie |options|.
121 // PLEASE NOTE that this method does not check whether a cookie is expired or 121 // PLEASE NOTE that this method does not check whether a cookie is expired or
122 // not! 122 // not!
123 bool IncludeForRequestURL(const GURL& url, 123 bool IncludeForRequestURL(const GURL& url,
124 const CookieOptions& options) const; 124 const CookieOptions& options) const;
125 125
126 std::string DebugString() const; 126 std::string DebugString() const;
127 127
128 // Returns a duplicate of this cookie.
129 CanonicalCookie* Duplicate();
130
128 // Returns the cookie source when cookies are set for |url|. This function 131 // Returns the cookie source when cookies are set for |url|. This function
129 // is public for unit test purposes only. 132 // is public for unit test purposes only.
130 static std::string GetCookieSourceFromURL(const GURL& url); 133 static std::string GetCookieSourceFromURL(const GURL& url);
131 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); 134 static std::string CanonPath(const GURL& url, const ParsedCookie& pc);
132 static base::Time CanonExpiration(const ParsedCookie& pc, 135 static base::Time CanonExpiration(const ParsedCookie& pc,
133 const base::Time& current, 136 const base::Time& current,
134 const base::Time& server_time); 137 const base::Time& server_time);
135 138
136 private: 139 private:
137 // The source member of a canonical cookie is the origin of the URL that tried 140 // The source member of a canonical cookie is the origin of the URL that tried
(...skipping 15 matching lines...) Expand all
153 bool secure_; 156 bool secure_;
154 bool httponly_; 157 bool httponly_;
155 CookiePriority priority_; 158 CookiePriority priority_;
156 }; 159 };
157 160
158 typedef std::vector<CanonicalCookie> CookieList; 161 typedef std::vector<CanonicalCookie> CookieList;
159 162
160 } // namespace net 163 } // namespace net
161 164
162 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ 165 #endif // NET_COOKIES_CANONICAL_COOKIE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698