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

Side by Side Diff: content/browser/service_worker/service_worker_request_handler.cc

Issue 2842833003: Update SupportsUserData uses with unique_ptr. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/service_worker/service_worker_request_handler.h" 5 #include "content/browser/service_worker/service_worker_request_handler.h"
6 6
7 #include <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 RequestContextFrameType frame_type, 68 RequestContextFrameType frame_type,
69 scoped_refptr<ResourceRequestBodyImpl> body) { 69 scoped_refptr<ResourceRequestBodyImpl> body) {
70 std::unique_ptr<ServiceWorkerRequestHandler> handler( 70 std::unique_ptr<ServiceWorkerRequestHandler> handler(
71 provider_host->CreateRequestHandler( 71 provider_host->CreateRequestHandler(
72 request_mode, credentials_mode, redirect_mode, resource_type, 72 request_mode, credentials_mode, redirect_mode, resource_type,
73 request_context_type, frame_type, blob_storage_context->AsWeakPtr(), 73 request_context_type, frame_type, blob_storage_context->AsWeakPtr(),
74 body, skip_service_worker)); 74 body, skip_service_worker));
75 if (!handler) 75 if (!handler)
76 return; 76 return;
77 77
78 request->SetUserData(&kUserDataKey, handler.release()); 78 request->SetUserData(&kUserDataKey, std::move(handler));
79 } 79 }
80 80
81 } // namespace 81 } // namespace
82 82
83 // PlzNavigate 83 // PlzNavigate
84 void ServiceWorkerRequestHandler::InitializeForNavigation( 84 void ServiceWorkerRequestHandler::InitializeForNavigation(
85 net::URLRequest* request, 85 net::URLRequest* request,
86 ServiceWorkerNavigationHandleCore* navigation_handle_core, 86 ServiceWorkerNavigationHandleCore* navigation_handle_core,
87 storage::BlobStorageContext* blob_storage_context, 87 storage::BlobStorageContext* blob_storage_context,
88 bool skip_service_worker, 88 bool skip_service_worker,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 ResourceType resource_type) 246 ResourceType resource_type)
247 : context_(context), 247 : context_(context),
248 provider_host_(provider_host), 248 provider_host_(provider_host),
249 blob_storage_context_(blob_storage_context), 249 blob_storage_context_(blob_storage_context),
250 resource_type_(resource_type), 250 resource_type_(resource_type),
251 old_process_id_(0), 251 old_process_id_(0),
252 old_provider_id_(kInvalidServiceWorkerProviderId) { 252 old_provider_id_(kInvalidServiceWorkerProviderId) {
253 } 253 }
254 254
255 } // namespace content 255 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698