| 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 #ifndef NET_FTP_FTP_AUTH_CACHE_H_ | 5 #ifndef NET_FTP_FTP_AUTH_CACHE_H_ |
| 6 #define NET_FTP_FTP_AUTH_CACHE_H_ | 6 #define NET_FTP_FTP_AUTH_CACHE_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "googleurl/src/gurl.h" | |
| 11 #include "net/base/auth.h" | 10 #include "net/base/auth.h" |
| 12 #include "net/base/net_export.h" | 11 #include "net/base/net_export.h" |
| 12 #include "url/gurl.h" |
| 13 | 13 |
| 14 namespace net { | 14 namespace net { |
| 15 | 15 |
| 16 // The FtpAuthCache class is a simple cache structure to store authentication | 16 // The FtpAuthCache class is a simple cache structure to store authentication |
| 17 // information for ftp. Provides lookup, insertion, and deletion of entries. | 17 // information for ftp. Provides lookup, insertion, and deletion of entries. |
| 18 // The parameter for doing lookups, insertions, and deletions is a GURL of the | 18 // The parameter for doing lookups, insertions, and deletions is a GURL of the |
| 19 // server's address (not a full URL with path, since FTP auth isn't per path). | 19 // server's address (not a full URL with path, since FTP auth isn't per path). |
| 20 // For example: | 20 // For example: |
| 21 // GURL("ftp://myserver") -- OK (implied port of 21) | 21 // GURL("ftp://myserver") -- OK (implied port of 21) |
| 22 // GURL("ftp://myserver:21") -- OK | 22 // GURL("ftp://myserver:21") -- OK |
| (...skipping 29 matching lines...) Expand all Loading... |
| 52 typedef std::list<Entry> EntryList; | 52 typedef std::list<Entry> EntryList; |
| 53 | 53 |
| 54 // Internal representation of cache, an STL list. This makes lookups O(n), | 54 // Internal representation of cache, an STL list. This makes lookups O(n), |
| 55 // but we expect n to be very low. | 55 // but we expect n to be very low. |
| 56 EntryList entries_; | 56 EntryList entries_; |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace net | 59 } // namespace net |
| 60 | 60 |
| 61 #endif // NET_FTP_FTP_AUTH_CACHE_H_ | 61 #endif // NET_FTP_FTP_AUTH_CACHE_H_ |
| OLD | NEW |