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

Side by Side Diff: content/renderer/service_worker/service_worker_context_client.cc

Issue 2715423003: [Mojo-Loading] Use independent URLLoaderClient (Closed)
Patch Set: fix Created 3 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/renderer/service_worker/service_worker_context_client.h" 5 #include "content/renderer/service_worker/service_worker_context_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 : fetch_event_id_(fetch_event_id), 274 : fetch_event_id_(fetch_event_id),
275 url_(url), 275 url_(url),
276 url_loader_(std::move(preload_handle->url_loader)), 276 url_loader_(std::move(preload_handle->url_loader)),
277 binding_(this, std::move(preload_handle->url_loader_client_request)) {} 277 binding_(this, std::move(preload_handle->url_loader_client_request)) {}
278 278
279 ~NavigationPreloadRequest() override { 279 ~NavigationPreloadRequest() override {
280 } 280 }
281 281
282 void OnReceiveResponse( 282 void OnReceiveResponse(
283 const ResourceResponseHead& response_head, 283 const ResourceResponseHead& response_head,
284 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file) override { 284 mojom::DownloadedTempFilePtr downloaded_file) override {
285 DCHECK(!response_); 285 DCHECK(!response_);
286 DCHECK(!downloaded_file.is_valid()); 286 DCHECK(!downloaded_file);
287 response_ = base::MakeUnique<blink::WebURLResponse>(); 287 response_ = base::MakeUnique<blink::WebURLResponse>();
288 // TODO(horo): Set report_security_info to true when DevTools is attached. 288 // TODO(horo): Set report_security_info to true when DevTools is attached.
289 const bool report_security_info = false; 289 const bool report_security_info = false;
290 WebURLLoaderImpl::PopulateURLResponse(url_, response_head, response_.get(), 290 WebURLLoaderImpl::PopulateURLResponse(url_, response_head, response_.get(),
291 report_security_info); 291 report_security_info);
292 MaybeReportResponseToClient(); 292 MaybeReportResponseToClient();
293 } 293 }
294 294
295 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, 295 void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
296 const ResourceResponseHead& response_head) override { 296 const ResourceResponseHead& response_head) override {
(...skipping 1008 matching lines...) Expand 10 before | Expand all | Expand 10 after
1305 } 1305 }
1306 1306
1307 base::WeakPtr<ServiceWorkerContextClient> 1307 base::WeakPtr<ServiceWorkerContextClient>
1308 ServiceWorkerContextClient::GetWeakPtr() { 1308 ServiceWorkerContextClient::GetWeakPtr() {
1309 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); 1309 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread());
1310 DCHECK(context_); 1310 DCHECK(context_);
1311 return context_->weak_factory.GetWeakPtr(); 1311 return context_->weak_factory.GetWeakPtr();
1312 } 1312 }
1313 1313
1314 } // namespace content 1314 } // namespace content
OLDNEW
« content/child/resource_dispatcher.cc ('K') | « content/common/url_loader_factory.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698