Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: net/base/host_cache.cc

Issue 10831277: [net] Change factory methods for HostResolver and HostCache to return a scoped_ptr (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use default scoped_ptr() instead of scoped_ptr(NULL) Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: net/base/host_cache.cc
diff --git a/net/base/host_cache.cc b/net/base/host_cache.cc
index f94b6869d76bf4e0b1f76f6117ded61774c93c9f..1f4719a3a67bd266586dfbab4468a9e6b798d2ae 100644
--- a/net/base/host_cache.cc
+++ b/net/base/host_cache.cc
@@ -71,7 +71,7 @@ const HostCache::EntryMap& HostCache::entries() const {
}
// static
-HostCache* HostCache::CreateDefaultCache() {
+scoped_ptr<HostCache> HostCache::CreateDefaultCache() {
#if defined(OS_CHROMEOS)
// Increase HostCache size for the duration of the async DNS field trial.
// http://crbug.com/143454
@@ -80,7 +80,7 @@ HostCache* HostCache::CreateDefaultCache() {
#else
static const size_t kMaxHostCacheEntries = 100;
#endif
- return new HostCache(kMaxHostCacheEntries);
+ return make_scoped_ptr(new HostCache(kMaxHostCacheEntries));
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698