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

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: remove unnecessary initialization; respond to review 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
« no previous file with comments | « net/base/host_cache.h ('k') | net/base/host_resolver.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_cache.cc
diff --git a/net/base/host_cache.cc b/net/base/host_cache.cc
index 9d746463f3dc7f1b826a6aae060595fe55973af8..5221fca9caeae744ad36b4b477f24afd0592dee4 100644
--- a/net/base/host_cache.cc
+++ b/net/base/host_cache.cc
@@ -79,7 +79,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
@@ -88,7 +88,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
« no previous file with comments | « net/base/host_cache.h ('k') | net/base/host_resolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698