| Index: content/browser/appcache/appcache_interceptor.cc
|
| diff --git a/content/browser/appcache/appcache_interceptor.cc b/content/browser/appcache/appcache_interceptor.cc
|
| index 8b916091dc7fcd9b23c5d6013c26e06eee851078..7d73fa0e9cad1ff526665a047ebefe9a5388a514 100644
|
| --- a/content/browser/appcache/appcache_interceptor.cc
|
| +++ b/content/browser/appcache/appcache_interceptor.cc
|
| @@ -4,6 +4,8 @@
|
|
|
| #include "content/browser/appcache/appcache_interceptor.h"
|
|
|
| +#include <utility>
|
| +
|
| #include "base/debug/crash_logging.h"
|
| #include "content/browser/appcache/appcache_backend_impl.h"
|
| #include "content/browser/appcache/appcache_host.h"
|
| @@ -21,9 +23,10 @@ static int kHandlerKey; // Value is not used.
|
|
|
| namespace content {
|
|
|
| -void AppCacheInterceptor::SetHandler(net::URLRequest* request,
|
| - AppCacheRequestHandler* handler) {
|
| - request->SetUserData(&kHandlerKey, handler); // request takes ownership
|
| +void AppCacheInterceptor::SetHandler(
|
| + net::URLRequest* request,
|
| + std::unique_ptr<AppCacheRequestHandler> handler) {
|
| + request->SetUserData(&kHandlerKey, std::move(handler));
|
| }
|
|
|
| AppCacheRequestHandler* AppCacheInterceptor::GetHandler(
|
| @@ -61,10 +64,10 @@ void AppCacheInterceptor::SetExtraRequestInfoForHost(
|
| ResourceType resource_type,
|
| bool should_reset_appcache) {
|
| // Create a handler for this request and associate it with the request.
|
| - AppCacheRequestHandler* handler =
|
| + std::unique_ptr<AppCacheRequestHandler> handler =
|
| host->CreateRequestHandler(request, resource_type, should_reset_appcache);
|
| if (handler)
|
| - SetHandler(request, handler);
|
| + SetHandler(request, std::move(handler));
|
| }
|
|
|
| void AppCacheInterceptor::GetExtraResponseInfo(net::URLRequest* request,
|
|
|