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

Unified Diff: content/browser/appcache/appcache_host.cc

Issue 2815913005: Switch to using scoped_ptr with UserData (Closed)
Patch Set: rebase Created 3 years, 8 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 | « content/browser/appcache/appcache_host.h ('k') | content/browser/appcache/appcache_interceptor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/appcache/appcache_host.cc
diff --git a/content/browser/appcache/appcache_host.cc b/content/browser/appcache/appcache_host.cc
index adcefe08f58db1828a62f8cf782ca04f340a1881..1c62678aa4d854577f0b0f476712617552c29361 100644
--- a/content/browser/appcache/appcache_host.cc
+++ b/content/browser/appcache/appcache_host.cc
@@ -5,6 +5,7 @@
#include "content/browser/appcache/appcache_host.h"
#include "base/logging.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "content/browser/appcache/appcache.h"
@@ -310,7 +311,7 @@ AppCacheHost* AppCacheHost::GetParentAppCacheHost() const {
return backend ? backend->GetHost(parent_host_id_) : NULL;
}
-AppCacheRequestHandler* AppCacheHost::CreateRequestHandler(
+std::unique_ptr<AppCacheRequestHandler> AppCacheHost::CreateRequestHandler(
net::URLRequest* request,
ResourceType resource_type,
bool should_reset_appcache) {
@@ -326,14 +327,14 @@ AppCacheRequestHandler* AppCacheHost::CreateRequestHandler(
// Store the first party origin so that it can be used later in SelectCache
// for checking whether the creation of the appcache is allowed.
first_party_url_ = request->first_party_for_cookies();
- return new AppCacheRequestHandler(
- this, resource_type, should_reset_appcache);
+ return base::WrapUnique(
+ new AppCacheRequestHandler(this, resource_type, should_reset_appcache));
}
if ((associated_cache() && associated_cache()->is_complete()) ||
is_selection_pending()) {
- return new AppCacheRequestHandler(
- this, resource_type, should_reset_appcache);
+ return base::WrapUnique(
+ new AppCacheRequestHandler(this, resource_type, should_reset_appcache));
}
return NULL;
}
« no previous file with comments | « content/browser/appcache/appcache_host.h ('k') | content/browser/appcache/appcache_interceptor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698