OLD | NEW |
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 |
11 #include <map> | 11 #include <map> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/basictypes.h" | 16 #include "base/basictypes.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/lock.h" | |
19 #include "base/ref_counted.h" | 18 #include "base/ref_counted.h" |
20 #include "base/scoped_ptr.h" | 19 #include "base/scoped_ptr.h" |
| 20 #include "base/synchronization/lock.h" |
21 #include "base/task.h" | 21 #include "base/task.h" |
22 #include "base/time.h" | 22 #include "base/time.h" |
23 #include "net/base/cookie_store.h" | 23 #include "net/base/cookie_store.h" |
24 | 24 |
25 class GURL; | 25 class GURL; |
26 | 26 |
27 namespace base { | 27 namespace base { |
28 class Histogram; | 28 class Histogram; |
29 } | 29 } |
30 | 30 |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 // Note: The default Time() constructor will create a value that compares | 478 // Note: The default Time() constructor will create a value that compares |
479 // earlier than any other time value, which is is wanted. Thus this | 479 // earlier than any other time value, which is is wanted. Thus this |
480 // value is not initialized. | 480 // value is not initialized. |
481 base::Time earliest_access_time_; | 481 base::Time earliest_access_time_; |
482 | 482 |
483 std::vector<std::string> cookieable_schemes_; | 483 std::vector<std::string> cookieable_schemes_; |
484 | 484 |
485 scoped_refptr<Delegate> delegate_; | 485 scoped_refptr<Delegate> delegate_; |
486 | 486 |
487 // Lock for thread-safety | 487 // Lock for thread-safety |
488 Lock lock_; | 488 base::Lock lock_; |
489 | 489 |
490 base::Time last_statistic_record_time_; | 490 base::Time last_statistic_record_time_; |
491 | 491 |
492 static bool enable_file_scheme_; | 492 static bool enable_file_scheme_; |
493 | 493 |
494 DISALLOW_COPY_AND_ASSIGN(CookieMonster); | 494 DISALLOW_COPY_AND_ASSIGN(CookieMonster); |
495 }; | 495 }; |
496 | 496 |
497 class CookieMonster::CanonicalCookie { | 497 class CookieMonster::CanonicalCookie { |
498 public: | 498 public: |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
720 private: | 720 private: |
721 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); | 721 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); |
722 }; | 722 }; |
723 | 723 |
724 class CookieList : public std::vector<CookieMonster::CanonicalCookie> { | 724 class CookieList : public std::vector<CookieMonster::CanonicalCookie> { |
725 }; | 725 }; |
726 | 726 |
727 } // namespace net | 727 } // namespace net |
728 | 728 |
729 #endif // NET_BASE_COOKIE_MONSTER_H_ | 729 #endif // NET_BASE_COOKIE_MONSTER_H_ |
OLD | NEW |