| OLD | NEW |
| 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_fetch_dispatcher.h" | 5 #include "content/browser/service_worker/service_worker_fetch_dispatcher.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 ~DelegatingURLLoaderClient() override {} | 79 ~DelegatingURLLoaderClient() override {} |
| 80 | 80 |
| 81 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override { | 81 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override { |
| 82 client_->OnDataDownloaded(data_length, encoded_length); | 82 client_->OnDataDownloaded(data_length, encoded_length); |
| 83 } | 83 } |
| 84 void OnTransferSizeUpdated(int32_t transfer_size_diff) override { | 84 void OnTransferSizeUpdated(int32_t transfer_size_diff) override { |
| 85 client_->OnTransferSizeUpdated(transfer_size_diff); | 85 client_->OnTransferSizeUpdated(transfer_size_diff); |
| 86 } | 86 } |
| 87 void OnReceiveResponse( | 87 void OnReceiveResponse( |
| 88 const ResourceResponseHead& head, | 88 const ResourceResponseHead& head, |
| 89 mojom::DownloadedTempFilePtr downloaded_file) override { | 89 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file) override { |
| 90 client_->OnReceiveResponse(head, std::move(downloaded_file)); | 90 client_->OnReceiveResponse(head, std::move(downloaded_file)); |
| 91 } | 91 } |
| 92 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, | 92 void OnReceiveRedirect(const net::RedirectInfo& redirect_info, |
| 93 const ResourceResponseHead& head) override { | 93 const ResourceResponseHead& head) override { |
| 94 client_->OnReceiveRedirect(redirect_info, head); | 94 client_->OnReceiveRedirect(redirect_info, head); |
| 95 } | 95 } |
| 96 void OnStartLoadingResponseBody( | 96 void OnStartLoadingResponseBody( |
| 97 mojo::ScopedDataPipeConsumerHandle body) override { | 97 mojo::ScopedDataPipeConsumerHandle body) override { |
| 98 client_->OnStartLoadingResponseBody(std::move(body)); | 98 client_->OnStartLoadingResponseBody(std::move(body)); |
| 99 } | 99 } |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 } | 479 } |
| 480 | 480 |
| 481 ServiceWorkerMetrics::EventType ServiceWorkerFetchDispatcher::GetEventType() | 481 ServiceWorkerMetrics::EventType ServiceWorkerFetchDispatcher::GetEventType() |
| 482 const { | 482 const { |
| 483 if (request_->fetch_type == ServiceWorkerFetchType::FOREIGN_FETCH) | 483 if (request_->fetch_type == ServiceWorkerFetchType::FOREIGN_FETCH) |
| 484 return ServiceWorkerMetrics::EventType::FOREIGN_FETCH; | 484 return ServiceWorkerMetrics::EventType::FOREIGN_FETCH; |
| 485 return ResourceTypeToEventType(resource_type_); | 485 return ResourceTypeToEventType(resource_type_); |
| 486 } | 486 } |
| 487 | 487 |
| 488 } // namespace content | 488 } // namespace content |
| OLD | NEW |