| OLD | NEW |
| 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 <stddef.h> |
| 11 #include <stdint.h> |
| 12 |
| 10 #include <deque> | 13 #include <deque> |
| 11 #include <map> | 14 #include <map> |
| 12 #include <queue> | 15 #include <queue> |
| 13 #include <set> | 16 #include <set> |
| 14 #include <string> | 17 #include <string> |
| 15 #include <utility> | 18 #include <utility> |
| 16 #include <vector> | 19 #include <vector> |
| 17 | 20 |
| 18 #include "base/basictypes.h" | |
| 19 #include "base/callback_forward.h" | 21 #include "base/callback_forward.h" |
| 20 #include "base/gtest_prod_util.h" | 22 #include "base/gtest_prod_util.h" |
| 23 #include "base/macros.h" |
| 21 #include "base/memory/linked_ptr.h" | 24 #include "base/memory/linked_ptr.h" |
| 22 #include "base/memory/ref_counted.h" | 25 #include "base/memory/ref_counted.h" |
| 23 #include "base/memory/scoped_ptr.h" | 26 #include "base/memory/scoped_ptr.h" |
| 24 #include "base/synchronization/lock.h" | 27 #include "base/synchronization/lock.h" |
| 25 #include "base/time/time.h" | 28 #include "base/time/time.h" |
| 26 #include "net/base/net_export.h" | 29 #include "net/base/net_export.h" |
| 27 #include "net/cookies/canonical_cookie.h" | 30 #include "net/cookies/canonical_cookie.h" |
| 28 #include "net/cookies/cookie_constants.h" | 31 #include "net/cookies/cookie_constants.h" |
| 29 #include "net/cookies/cookie_store.h" | 32 #include "net/cookies/cookie_store.h" |
| 30 #include "url/gurl.h" | 33 #include "url/gurl.h" |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 // find cookies to purge. | 783 // find cookies to purge. |
| 781 // Note: The default Time() constructor will create a value that compares | 784 // Note: The default Time() constructor will create a value that compares |
| 782 // earlier than any other time value, which is wanted. Thus this | 785 // earlier than any other time value, which is wanted. Thus this |
| 783 // value is not initialized. | 786 // value is not initialized. |
| 784 base::Time earliest_access_time_; | 787 base::Time earliest_access_time_; |
| 785 | 788 |
| 786 // During loading, holds the set of all loaded cookie creation times. Used to | 789 // During loading, holds the set of all loaded cookie creation times. Used to |
| 787 // avoid ever letting cookies with duplicate creation times into the store; | 790 // avoid ever letting cookies with duplicate creation times into the store; |
| 788 // that way we don't have to worry about what sections of code are safe | 791 // that way we don't have to worry about what sections of code are safe |
| 789 // to call while it's in that state. | 792 // to call while it's in that state. |
| 790 std::set<int64> creation_times_; | 793 std::set<int64_t> creation_times_; |
| 791 | 794 |
| 792 std::vector<std::string> cookieable_schemes_; | 795 std::vector<std::string> cookieable_schemes_; |
| 793 | 796 |
| 794 scoped_refptr<CookieMonsterDelegate> delegate_; | 797 scoped_refptr<CookieMonsterDelegate> delegate_; |
| 795 | 798 |
| 796 // Lock for thread-safety | 799 // Lock for thread-safety |
| 797 base::Lock lock_; | 800 base::Lock lock_; |
| 798 | 801 |
| 799 base::Time last_statistic_record_time_; | 802 base::Time last_statistic_record_time_; |
| 800 | 803 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 virtual ~PersistentCookieStore() {} | 894 virtual ~PersistentCookieStore() {} |
| 892 | 895 |
| 893 private: | 896 private: |
| 894 friend class base::RefCountedThreadSafe<PersistentCookieStore>; | 897 friend class base::RefCountedThreadSafe<PersistentCookieStore>; |
| 895 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); | 898 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); |
| 896 }; | 899 }; |
| 897 | 900 |
| 898 } // namespace net | 901 } // namespace net |
| 899 | 902 |
| 900 #endif // NET_COOKIES_COOKIE_MONSTER_H_ | 903 #endif // NET_COOKIES_COOKIE_MONSTER_H_ |
| OLD | NEW |