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

Side by Side Diff: net/base/cookie_monster.h

Issue 5318002: Also register read cookies in the content settings delegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Brought to you by the letter D and the number 2. 5 // Brought to you by the letter D and the number 2.
6 6
7 #ifndef NET_BASE_COOKIE_MONSTER_H_ 7 #ifndef NET_BASE_COOKIE_MONSTER_H_
8 #define NET_BASE_COOKIE_MONSTER_H_ 8 #define NET_BASE_COOKIE_MONSTER_H_
9 #pragma once 9 #pragma once
10 10
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 const base::Time& expiration_time, 161 const base::Time& expiration_time,
162 bool secure, bool http_only); 162 bool secure, bool http_only);
163 163
164 // Returns all the cookies, for use in management UI, etc. This does not mark 164 // Returns all the cookies, for use in management UI, etc. This does not mark
165 // the cookies as having been accessed. 165 // the cookies as having been accessed.
166 // The returned cookies are ordered by longest path, then by earliest 166 // The returned cookies are ordered by longest path, then by earliest
167 // creation date. 167 // creation date.
168 CookieList GetAllCookies(); 168 CookieList GetAllCookies();
169 169
170 // Returns all the cookies, for use in management UI, etc. Filters results 170 // Returns all the cookies, for use in management UI, etc. Filters results
171 // using given url scheme, host / domain and path. This does not mark the 171 // using given url scheme, host / domain and path and options. This does not
172 // cookies as having been accessed. 172 // mark the cookies as having been accessed.
173 // The returned cookies are ordered by longest path, then earliest 173 // The returned cookies are ordered by longest path, then earliest
174 // creation date. 174 // creation date.
175 CookieList GetAllCookiesForURLWithOptions(const GURL& url,
176 const CookieOptions& options);
177
178 // Invokes GetAllCookiesForURLWithOptions with options set to include HTTP
179 // only cookies.
175 CookieList GetAllCookiesForURL(const GURL& url); 180 CookieList GetAllCookiesForURL(const GURL& url);
176 181
177 // Deletes all of the cookies. 182 // Deletes all of the cookies.
178 int DeleteAll(bool sync_to_store); 183 int DeleteAll(bool sync_to_store);
179 // Deletes all of the cookies that have a creation_date greater than or equal 184 // Deletes all of the cookies that have a creation_date greater than or equal
180 // to |delete_begin| and less than |delete_end| 185 // to |delete_begin| and less than |delete_end|
181 int DeleteAllCreatedBetween(const base::Time& delete_begin, 186 int DeleteAllCreatedBetween(const base::Time& delete_begin,
182 const base::Time& delete_end, 187 const base::Time& delete_end,
183 bool sync_to_store); 188 bool sync_to_store);
184 // Deletes all of the cookies that have a creation_date more recent than the 189 // Deletes all of the cookies that have a creation_date more recent than the
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 bool initialized_; 441 bool initialized_;
437 442
438 // Indicates whether this cookie monster uses the new effective domain 443 // Indicates whether this cookie monster uses the new effective domain
439 // key scheme or not. 444 // key scheme or not.
440 ExpiryAndKeyScheme expiry_and_key_scheme_; 445 ExpiryAndKeyScheme expiry_and_key_scheme_;
441 446
442 scoped_refptr<PersistentCookieStore> store_; 447 scoped_refptr<PersistentCookieStore> store_;
443 448
444 // The resolution of our time isn't enough, so we do something 449 // The resolution of our time isn't enough, so we do something
445 // ugly and increment when we've seen the same time twice. 450 // ugly and increment when we've seen the same time twice.
446 base::Time CurrentTime(); 451 base::Time StrictlyIncreasingTime();
darin (slow to review) 2010/11/24 18:10:47 we generally try to avoid including X11 headers in
jochen (gone - plz use gerrit) 2010/11/24 18:45:38 the headers get included from chrome/browser/gtk/g
447 base::Time last_time_seen_; 452 base::Time last_time_seen_;
448 453
449 // Minimum delay after updating a cookie's LastAccessDate before we will 454 // Minimum delay after updating a cookie's LastAccessDate before we will
450 // update it again. 455 // update it again.
451 const base::TimeDelta last_access_threshold_; 456 const base::TimeDelta last_access_threshold_;
452 457
453 // Approximate date of access time of least recently accessed cookie 458 // Approximate date of access time of least recently accessed cookie
454 // in |cookies_|. Note that this is not guaranteed to be accurate, only a) 459 // in |cookies_|. Note that this is not guaranteed to be accurate, only a)
455 // to be before or equal to the actual time, and b) to be accurate 460 // to be before or equal to the actual time, and b) to be accurate
456 // immediately after a garbage collection that scans through all the cookies. 461 // immediately after a garbage collection that scans through all the cookies.
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 protected: 694 protected:
690 PersistentCookieStore() { } 695 PersistentCookieStore() { }
691 696
692 private: 697 private:
693 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); 698 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore);
694 }; 699 };
695 700
696 } // namespace net 701 } // namespace net
697 702
698 #endif // NET_BASE_COOKIE_MONSTER_H_ 703 #endif // NET_BASE_COOKIE_MONSTER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698