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 // Portions of this code based on Mozilla: | 5 // Portions of this code based on Mozilla: |
6 // (netwerk/cookie/src/nsCookieService.cpp) | 6 // (netwerk/cookie/src/nsCookieService.cpp) |
7 /* ***** BEGIN LICENSE BLOCK ***** | 7 /* ***** BEGIN LICENSE BLOCK ***** |
8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 8 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
9 * | 9 * |
10 * The contents of this file are subject to the Mozilla Public License Version | 10 * The contents of this file are subject to the Mozilla Public License Version |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 | 67 |
68 namespace net { | 68 namespace net { |
69 | 69 |
70 // Cookie garbage collection thresholds. Based off of the Mozilla defaults. | 70 // Cookie garbage collection thresholds. Based off of the Mozilla defaults. |
71 // It might seem scary to have a high purge value, but really it's not. You | 71 // It might seem scary to have a high purge value, but really it's not. You |
72 // just make sure that you increase the max to cover the increase in purge, | 72 // just make sure that you increase the max to cover the increase in purge, |
73 // and we would have been purging the same amount of cookies. We're just | 73 // and we would have been purging the same amount of cookies. We're just |
74 // going through the garbage collection process less often. | 74 // going through the garbage collection process less often. |
75 static const size_t kNumCookiesPerHost = 70; // ~50 cookies | 75 static const size_t kNumCookiesPerHost = 70; // ~50 cookies |
76 static const size_t kNumCookiesPerHostPurge = 20; | 76 static const size_t kNumCookiesPerHostPurge = 20; |
77 static const size_t kNumCookiesTotal = 1100; // ~1000 cookies | 77 static const size_t kNumCookiesTotal = 3300; // ~3000 cookies |
78 static const size_t kNumCookiesTotalPurge = 100; | 78 static const size_t kNumCookiesTotalPurge = 300; |
79 | 79 |
80 // Default minimum delay after updating a cookie's LastAccessDate before we | 80 // Default minimum delay after updating a cookie's LastAccessDate before we |
81 // will update it again. | 81 // will update it again. |
82 static const int kDefaultAccessUpdateThresholdSeconds = 60; | 82 static const int kDefaultAccessUpdateThresholdSeconds = 60; |
83 | 83 |
84 // static | 84 // static |
85 bool CookieMonster::enable_file_scheme_ = false; | 85 bool CookieMonster::enable_file_scheme_ = false; |
86 | 86 |
87 // static | 87 // static |
88 void CookieMonster::EnableFileScheme() { | 88 void CookieMonster::EnableFileScheme() { |
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1122 return true; | 1122 return true; |
1123 } | 1123 } |
1124 | 1124 |
1125 std::string CookieMonster::CanonicalCookie::DebugString() const { | 1125 std::string CookieMonster::CanonicalCookie::DebugString() const { |
1126 return StringPrintf("name: %s value: %s path: %s creation: %llu", | 1126 return StringPrintf("name: %s value: %s path: %s creation: %llu", |
1127 name_.c_str(), value_.c_str(), path_.c_str(), | 1127 name_.c_str(), value_.c_str(), path_.c_str(), |
1128 creation_date_.ToTimeT()); | 1128 creation_date_.ToTimeT()); |
1129 } | 1129 } |
1130 | 1130 |
1131 } // namespace | 1131 } // namespace |
OLD | NEW |