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 #include "chrome/browser/net/url_fetcher_protect.h" | 5 #include "chrome/browser/net/url_fetcher_protect.h" |
6 | 6 |
| 7 #include "base/logging.h" |
| 8 |
7 // URLFetcherProtectEntry ---------------------------------------------------- | 9 // URLFetcherProtectEntry ---------------------------------------------------- |
8 | 10 |
9 using base::TimeDelta; | 11 using base::TimeDelta; |
10 using base::TimeTicks; | 12 using base::TimeTicks; |
11 | 13 |
12 // Default parameters. Time is in milliseconds. | 14 // Default parameters. Time is in milliseconds. |
13 // static | 15 // static |
14 const int URLFetcherProtectEntry::kDefaultSlidingWindowPeriod = 2000; | 16 const int URLFetcherProtectEntry::kDefaultSlidingWindowPeriod = 2000; |
15 | 17 |
16 const int URLFetcherProtectEntry::kDefaultMaxSendThreshold = 20; | 18 const int URLFetcherProtectEntry::kDefaultMaxSendThreshold = 20; |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 | 166 |
165 ProtectService::iterator i = services_.find(id); | 167 ProtectService::iterator i = services_.find(id); |
166 if (i != services_.end()) { | 168 if (i != services_.end()) { |
167 // The entry exists. | 169 // The entry exists. |
168 delete i->second; | 170 delete i->second; |
169 } | 171 } |
170 | 172 |
171 services_[id] = entry; | 173 services_[id] = entry; |
172 return entry; | 174 return entry; |
173 } | 175 } |
OLD | NEW |