| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/base/host_cache.h" | 5 #include "net/base/host_cache.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/base/net_errors.h" | 8 #include "net/base/net_errors.h" |
| 9 | 9 |
| 10 namespace net { | 10 namespace net { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 return entries_.max_entries(); | 64 return entries_.max_entries(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 // Note that this map may contain expired entries. | 67 // Note that this map may contain expired entries. |
| 68 const HostCache::EntryMap& HostCache::entries() const { | 68 const HostCache::EntryMap& HostCache::entries() const { |
| 69 DCHECK(CalledOnValidThread()); | 69 DCHECK(CalledOnValidThread()); |
| 70 return entries_; | 70 return entries_; |
| 71 } | 71 } |
| 72 | 72 |
| 73 // static | 73 // static |
| 74 HostCache* HostCache::CreateDefaultCache() { | 74 scoped_ptr<HostCache> HostCache::CreateDefaultCache() { |
| 75 static const size_t kMaxHostCacheEntries = 100; | 75 static const size_t kMaxHostCacheEntries = 100; |
| 76 return new HostCache(kMaxHostCacheEntries); | 76 return make_scoped_ptr(new HostCache(kMaxHostCacheEntries)); |
| 77 } | 77 } |
| 78 | 78 |
| 79 } // namespace net | 79 } // namespace net |
| OLD | NEW |