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

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

Issue 2561743003: Use associated interface on DownloadedTempFile (Closed)
Patch Set: +NOTREACHED on non frame trasfer Created 3 years, 11 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
« no previous file with comments | « content/common/url_loader.mojom ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 : fetch_event_id_(fetch_event_id), 264 : fetch_event_id_(fetch_event_id),
265 url_(url), 265 url_(url),
266 url_loader_(std::move(preload_handle->url_loader)), 266 url_loader_(std::move(preload_handle->url_loader)),
267 binding_(this, std::move(preload_handle->url_loader_client_request)) {} 267 binding_(this, std::move(preload_handle->url_loader_client_request)) {}
268 268
269 ~NavigationPreloadRequest() override { 269 ~NavigationPreloadRequest() override {
270 } 270 }
271 271
272 void OnReceiveResponse( 272 void OnReceiveResponse(
273 const ResourceResponseHead& response_head, 273 const ResourceResponseHead& response_head,
274 mojom::DownloadedTempFilePtr downloaded_file) override { 274 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file) override {
275 DCHECK(!response_); 275 DCHECK(!response_);
276 DCHECK(!downloaded_file); 276 DCHECK(!downloaded_file.is_valid());
277 response_ = base::MakeUnique<blink::WebURLResponse>(); 277 response_ = base::MakeUnique<blink::WebURLResponse>();
278 // TODO(horo): Set report_security_info to true when DevTools is attached. 278 // TODO(horo): Set report_security_info to true when DevTools is attached.
279 const bool report_security_info = false; 279 const bool report_security_info = false;
280 WebURLLoaderImpl::PopulateURLResponse(url_, response_head, response_.get(), 280 WebURLLoaderImpl::PopulateURLResponse(url_, response_head, response_.get(),
281 report_security_info); 281 report_security_info);
282 MaybeReportResponseToClient(); 282 MaybeReportResponseToClient();
283 } 283 }
284 284
285 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, 285 void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
286 const ResourceResponseHead& response_head) override { 286 const ResourceResponseHead& response_head) override {
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 } 1250 }
1251 1251
1252 base::WeakPtr<ServiceWorkerContextClient> 1252 base::WeakPtr<ServiceWorkerContextClient>
1253 ServiceWorkerContextClient::GetWeakPtr() { 1253 ServiceWorkerContextClient::GetWeakPtr() {
1254 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); 1254 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread());
1255 DCHECK(context_); 1255 DCHECK(context_);
1256 return context_->weak_factory.GetWeakPtr(); 1256 return context_->weak_factory.GetWeakPtr();
1257 } 1257 }
1258 1258
1259 } // namespace content 1259 } // namespace content
OLDNEW
« no previous file with comments | « content/common/url_loader.mojom ('k') | third_party/WebKit/LayoutTests/TestExpectations » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698