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

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

Issue 10831117: Remove ENABLE_PERSISTENT_SESSION_COOKIES (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebased Created 8 years, 4 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
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 114
115 // Returns the cookie source when cookies are set for |url|. This function 115 // Returns the cookie source when cookies are set for |url|. This function
116 // is public for unit test purposes only. 116 // is public for unit test purposes only.
117 static std::string GetCookieSourceFromURL(const GURL& url); 117 static std::string GetCookieSourceFromURL(const GURL& url);
118 static std::string CanonPath(const GURL& url, const ParsedCookie& pc); 118 static std::string CanonPath(const GURL& url, const ParsedCookie& pc);
119 static base::Time CanonExpiration(const ParsedCookie& pc, 119 static base::Time CanonExpiration(const ParsedCookie& pc,
120 const base::Time& current, 120 const base::Time& current,
121 const base::Time& server_time); 121 const base::Time& server_time);
122 122
123 private: 123 private:
124 // Gives the session cookie an expiration time if needed
125 void SetSessionCookieExpiryTime();
126
127 // The source member of a canonical cookie is the origin of the URL that tried 124 // The source member of a canonical cookie is the origin of the URL that tried
128 // to set this cookie, minus the port number if any. This field is not 125 // to set this cookie, minus the port number if any. This field is not
129 // persistent though; its only used in the in-tab cookies dialog to show the 126 // persistent though; its only used in the in-tab cookies dialog to show the
130 // user the source URL. This is used for both allowed and blocked cookies. 127 // user the source URL. This is used for both allowed and blocked cookies.
131 // When a CanonicalCookie is constructed from the backing store (common case) 128 // When a CanonicalCookie is constructed from the backing store (common case)
132 // this field will be null. CanonicalCookie consumers should not rely on 129 // this field will be null. CanonicalCookie consumers should not rely on
133 // this field unless they guarantee that the creator of those 130 // this field unless they guarantee that the creator of those
134 // CanonicalCookies properly initialized the field. 131 // CanonicalCookies properly initialized the field.
135 // TODO(abarth): We might need to make this field persistent for MAC cookies. 132 // TODO(abarth): We might need to make this field persistent for MAC cookies.
136 std::string source_; 133 std::string source_;
137 std::string name_; 134 std::string name_;
138 std::string value_; 135 std::string value_;
139 std::string domain_; 136 std::string domain_;
140 std::string path_; 137 std::string path_;
141 std::string mac_key_; // TODO(abarth): Persist to disk. 138 std::string mac_key_; // TODO(abarth): Persist to disk.
142 std::string mac_algorithm_; // TODO(abarth): Persist to disk. 139 std::string mac_algorithm_; // TODO(abarth): Persist to disk.
143 base::Time creation_date_; 140 base::Time creation_date_;
144 base::Time expiry_date_; 141 base::Time expiry_date_;
145 base::Time last_access_date_; 142 base::Time last_access_date_;
146 bool secure_; 143 bool secure_;
147 bool httponly_; 144 bool httponly_;
148 }; 145 };
149 146
150 typedef std::vector<CanonicalCookie> CookieList; 147 typedef std::vector<CanonicalCookie> CookieList;
151 148
152 } // namespace net 149 } // namespace net
153 150
154 #endif // NET_COOKIES_CANONICAL_COOKIE_H_ 151 #endif // NET_COOKIES_CANONICAL_COOKIE_H_
OLDNEW
« no previous file with comments | « no previous file | net/cookies/canonical_cookie.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698