| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 CookieMonster(); | 54 CookieMonster(); |
| 55 | 55 |
| 56 // The store passed in should not have had Init() called on it yet. This class | 56 // The store passed in should not have had Init() called on it yet. This class |
| 57 // will take care of initializing it. The backing store is NOT owned by this | 57 // will take care of initializing it. The backing store is NOT owned by this |
| 58 // class, but it must remain valid for the duration of the cookie monster's | 58 // class, but it must remain valid for the duration of the cookie monster's |
| 59 // existence. | 59 // existence. |
| 60 CookieMonster(PersistentCookieStore* store); | 60 CookieMonster(PersistentCookieStore* store); |
| 61 | 61 |
| 62 #ifdef UNIT_TEST | 62 #ifdef UNIT_TEST |
| 63 CookieMonster(int last_access_threshold_seconds) | 63 CookieMonster(int last_access_threshold_milliseconds) |
| 64 : initialized_(false), | 64 : initialized_(false), |
| 65 store_(NULL), | 65 store_(NULL), |
| 66 last_access_threshold_( | 66 last_access_threshold_(base::TimeDelta::FromMilliseconds( |
| 67 base::TimeDelta::FromSeconds(last_access_threshold_seconds)) { | 67 last_access_threshold_milliseconds)) { |
| 68 SetDefaultCookieableSchemes(); | 68 SetDefaultCookieableSchemes(); |
| 69 } | 69 } |
| 70 #endif | 70 #endif |
| 71 | 71 |
| 72 ~CookieMonster(); | 72 ~CookieMonster(); |
| 73 | 73 |
| 74 // Parse the string with the cookie time (very forgivingly). | 74 // Parse the string with the cookie time (very forgivingly). |
| 75 static base::Time ParseCookieTime(const std::string& time_string); | 75 static base::Time ParseCookieTime(const std::string& time_string); |
| 76 | 76 |
| 77 // CookieStore implementation. | 77 // CookieStore implementation. |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 protected: | 386 protected: |
| 387 PersistentCookieStore() { } | 387 PersistentCookieStore() { } |
| 388 | 388 |
| 389 private: | 389 private: |
| 390 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); | 390 DISALLOW_COPY_AND_ASSIGN(PersistentCookieStore); |
| 391 }; | 391 }; |
| 392 | 392 |
| 393 } // namespace net | 393 } // namespace net |
| 394 | 394 |
| 395 #endif // NET_BASE_COOKIE_MONSTER_H_ | 395 #endif // NET_BASE_COOKIE_MONSTER_H_ |
| OLD | NEW |