| Index: net/ftp/ftp_auth_cache.cc
|
| diff --git a/net/ftp/ftp_auth_cache.cc b/net/ftp/ftp_auth_cache.cc
|
| index 370cee57379a3e00fc591c47b30523bec95abfc7..be459bdc09fd7d8a09b0c7636a85c76f8cc921b9 100644
|
| --- a/net/ftp/ftp_auth_cache.cc
|
| +++ b/net/ftp/ftp_auth_cache.cc
|
| @@ -5,17 +5,15 @@
|
| #include "net/ftp/ftp_auth_cache.h"
|
|
|
| #include "base/logging.h"
|
| -#include "url/gurl.h"
|
|
|
| namespace net {
|
|
|
| // static
|
| const size_t FtpAuthCache::kMaxEntries = 10;
|
|
|
| -FtpAuthCache::Entry::Entry(const GURL& origin,
|
| +FtpAuthCache::Entry::Entry(const url::Origin& origin,
|
| const AuthCredentials& credentials)
|
| - : origin(origin),
|
| - credentials(credentials) {
|
| + : origin(origin), credentials(credentials) {
|
| }
|
|
|
| FtpAuthCache::Entry::~Entry() {}
|
| @@ -24,17 +22,17 @@ FtpAuthCache::FtpAuthCache() {}
|
|
|
| FtpAuthCache::~FtpAuthCache() {}
|
|
|
| -FtpAuthCache::Entry* FtpAuthCache::Lookup(const GURL& origin) {
|
| +FtpAuthCache::Entry* FtpAuthCache::Lookup(const url::Origin& origin) {
|
| for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) {
|
| if (it->origin == origin)
|
| return &(*it);
|
| }
|
| - return NULL;
|
| + return nullptr;
|
| }
|
|
|
| -void FtpAuthCache::Add(const GURL& origin, const AuthCredentials& credentials) {
|
| +void FtpAuthCache::Add(const url::Origin& origin,
|
| + const AuthCredentials& credentials) {
|
| DCHECK(origin.SchemeIs("ftp"));
|
| - DCHECK_EQ(origin.GetOrigin(), origin);
|
|
|
| Entry* entry = Lookup(origin);
|
| if (entry) {
|
| @@ -48,7 +46,7 @@ void FtpAuthCache::Add(const GURL& origin, const AuthCredentials& credentials) {
|
| }
|
| }
|
|
|
| -void FtpAuthCache::Remove(const GURL& origin,
|
| +void FtpAuthCache::Remove(const url::Origin& origin,
|
| const AuthCredentials& credentials) {
|
| for (EntryList::iterator it = entries_.begin(); it != entries_.end(); ++it) {
|
| if (it->origin == origin && it->credentials.Equals(credentials)) {
|
|
|