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

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

Issue 14113014: Adding Priority field to cookies. (Closed) Base URL: http://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed enums PRIORITY_* to COOKIE_PRIORITY_*. Created 7 years, 8 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 | « net/cookies/cookie_constants_unittest.cc ('k') | net/cookies/cookie_monster.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 // 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_COOKIES_COOKIE_MONSTER_H_ 7 #ifndef NET_COOKIES_COOKIE_MONSTER_H_
8 #define NET_COOKIES_COOKIE_MONSTER_H_ 8 #define NET_COOKIES_COOKIE_MONSTER_H_
9 9
10 #include <deque> 10 #include <deque>
11 #include <map> 11 #include <map>
12 #include <queue> 12 #include <queue>
13 #include <set> 13 #include <set>
14 #include <string> 14 #include <string>
15 #include <utility> 15 #include <utility>
16 #include <vector> 16 #include <vector>
17 17
18 #include "base/basictypes.h" 18 #include "base/basictypes.h"
19 #include "base/callback_forward.h" 19 #include "base/callback_forward.h"
20 #include "base/gtest_prod_util.h" 20 #include "base/gtest_prod_util.h"
21 #include "base/memory/ref_counted.h" 21 #include "base/memory/ref_counted.h"
22 #include "base/memory/scoped_ptr.h" 22 #include "base/memory/scoped_ptr.h"
23 #include "base/synchronization/lock.h" 23 #include "base/synchronization/lock.h"
24 #include "base/time.h" 24 #include "base/time.h"
25 #include "net/base/net_export.h" 25 #include "net/base/net_export.h"
26 #include "net/cookies/canonical_cookie.h" 26 #include "net/cookies/canonical_cookie.h"
27 #include "net/cookies/cookie_constants.h"
27 #include "net/cookies/cookie_store.h" 28 #include "net/cookies/cookie_store.h"
28 29
29 class GURL; 30 class GURL;
30 31
31 namespace base { 32 namespace base {
32 class Histogram; 33 class Histogram;
33 class HistogramBase; 34 class HistogramBase;
34 class TimeTicks; 35 class TimeTicks;
35 } // namespace base 36 } // namespace base
36 37
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // function expects each attribute to be well-formed. It will check for 131 // function expects each attribute to be well-formed. It will check for
131 // disallowed characters (e.g. the ';' character is disallowed within the 132 // disallowed characters (e.g. the ';' character is disallowed within the
132 // cookie value attribute) and will return false without setting the cookie 133 // cookie value attribute) and will return false without setting the cookie
133 // if such characters are found. 134 // if such characters are found.
134 void SetCookieWithDetailsAsync(const GURL& url, 135 void SetCookieWithDetailsAsync(const GURL& url,
135 const std::string& name, 136 const std::string& name,
136 const std::string& value, 137 const std::string& value,
137 const std::string& domain, 138 const std::string& domain,
138 const std::string& path, 139 const std::string& path,
139 const base::Time& expiration_time, 140 const base::Time& expiration_time,
140 bool secure, bool http_only, 141 bool secure,
142 bool http_only,
143 CookiePriority priority,
141 const SetCookiesCallback& callback); 144 const SetCookiesCallback& callback);
142 145
143 146
144 // Returns all the cookies, for use in management UI, etc. This does not mark 147 // Returns all the cookies, for use in management UI, etc. This does not mark
145 // the cookies as having been accessed. 148 // the cookies as having been accessed.
146 // The returned cookies are ordered by longest path, then by earliest 149 // The returned cookies are ordered by longest path, then by earliest
147 // creation date. 150 // creation date.
148 void GetAllCookiesAsync(const GetCookieListCallback& callback); 151 void GetAllCookiesAsync(const GetCookieListCallback& callback);
149 152
150 // Returns all the cookies, for use in management UI, etc. Filters results 153 // Returns all the cookies, for use in management UI, etc. Filters results
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 367
365 // The following are synchronous calls to which the asynchronous methods 368 // The following are synchronous calls to which the asynchronous methods
366 // delegate either immediately (if the store is loaded) or through a deferred 369 // delegate either immediately (if the store is loaded) or through a deferred
367 // task (if the store is not yet loaded). 370 // task (if the store is not yet loaded).
368 bool SetCookieWithDetails(const GURL& url, 371 bool SetCookieWithDetails(const GURL& url,
369 const std::string& name, 372 const std::string& name,
370 const std::string& value, 373 const std::string& value,
371 const std::string& domain, 374 const std::string& domain,
372 const std::string& path, 375 const std::string& path,
373 const base::Time& expiration_time, 376 const base::Time& expiration_time,
374 bool secure, bool http_only); 377 bool secure,
378 bool http_only,
379 CookiePriority priority);
375 380
376 CookieList GetAllCookies(); 381 CookieList GetAllCookies();
377 382
378 CookieList GetAllCookiesForURLWithOptions(const GURL& url, 383 CookieList GetAllCookiesForURLWithOptions(const GURL& url,
379 const CookieOptions& options); 384 const CookieOptions& options);
380 385
381 CookieList GetAllCookiesForURL(const GURL& url); 386 CookieList GetAllCookiesForURL(const GURL& url);
382 387
383 int DeleteAll(bool sync_to_store); 388 int DeleteAll(bool sync_to_store);
384 389
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 virtual ~PersistentCookieStore() {} 725 virtual ~PersistentCookieStore() {}
721 726
722 private: 727 private:
723 friend class base::RefCountedThreadSafe<PersistentCookieStore>; 728 friend class base::RefCountedThreadSafe<PersistentCookieStore>;
724 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); 729 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore);
725 }; 730 };
726 731
727 } // namespace net 732 } // namespace net
728 733
729 #endif // NET_COOKIES_COOKIE_MONSTER_H_ 734 #endif // NET_COOKIES_COOKIE_MONSTER_H_
OLDNEW
« no previous file with comments | « net/cookies/cookie_constants_unittest.cc ('k') | net/cookies/cookie_monster.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698