| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "net/ftp/ftp_auth_cache.h" | 5 #include "net/ftp/ftp_auth_cache.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "googleurl/src/gurl.h" | 8 #include "url/gurl.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| 11 | 11 |
| 12 // static | 12 // static |
| 13 const size_t FtpAuthCache::kMaxEntries = 10; | 13 const size_t FtpAuthCache::kMaxEntries = 10; |
| 14 | 14 |
| 15 FtpAuthCache::Entry::Entry(const GURL& origin, | 15 FtpAuthCache::Entry::Entry(const GURL& origin, |
| 16 const AuthCredentials& credentials) | 16 const AuthCredentials& credentials) |
| 17 : origin(origin), | 17 : origin(origin), |
| 18 credentials(credentials) { | 18 credentials(credentials) { |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) { | 53 for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) { |
| 54 if (it->origin == origin && it->credentials.Equals(credentials)) { | 54 if (it->origin == origin && it->credentials.Equals(credentials)) { |
| 55 entries_.erase(it); | 55 entries_.erase(it); |
| 56 DCHECK(!Lookup(origin)); | 56 DCHECK(!Lookup(origin)); |
| 57 return; | 57 return; |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 } // namespace net | 62 } // namespace net |
| OLD | NEW |