Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 | 287 |
| 288 void OnDataDownloaded(int64_t data_length, | 288 void OnDataDownloaded(int64_t data_length, |
| 289 int64_t encoded_data_length) override { | 289 int64_t encoded_data_length) override { |
| 290 NOTREACHED(); | 290 NOTREACHED(); |
| 291 } | 291 } |
| 292 | 292 |
| 293 void OnTransferSizeUpdated(int32_t transfer_size_diff) override { | 293 void OnTransferSizeUpdated(int32_t transfer_size_diff) override { |
| 294 NOTREACHED(); | 294 NOTREACHED(); |
| 295 } | 295 } |
| 296 | 296 |
| 297 void OnUploadProgress(int64_t current_position, | |
|
nhiroki
2017/01/06 05:30:09
ditto.
tzik
2017/01/18 12:56:43
Done.
| |
| 298 int64_t total_size, | |
| 299 const base::Closure& ack_callback) override { | |
| 300 NOTREACHED(); | |
| 301 } | |
| 302 | |
| 297 void OnStartLoadingResponseBody( | 303 void OnStartLoadingResponseBody( |
| 298 mojo::ScopedDataPipeConsumerHandle body) override { | 304 mojo::ScopedDataPipeConsumerHandle body) override { |
| 299 DCHECK(!body_.is_valid()); | 305 DCHECK(!body_.is_valid()); |
| 300 body_ = std::move(body); | 306 body_ = std::move(body); |
| 301 MaybeReportResponseToClient(); | 307 MaybeReportResponseToClient(); |
| 302 } | 308 } |
| 303 | 309 |
| 304 void OnComplete(const ResourceRequestCompletionStatus& status) override { | 310 void OnComplete(const ResourceRequestCompletionStatus& status) override { |
| 305 // We don't report to |client| if OnStartLoadingResponseBody() has already | 311 // We don't report to |client| if OnStartLoadingResponseBody() has already |
| 306 // called OnNavigationPreloadResponse(). | 312 // called OnNavigationPreloadResponse(). |
| (...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1280 } | 1286 } |
| 1281 | 1287 |
| 1282 base::WeakPtr<ServiceWorkerContextClient> | 1288 base::WeakPtr<ServiceWorkerContextClient> |
| 1283 ServiceWorkerContextClient::GetWeakPtr() { | 1289 ServiceWorkerContextClient::GetWeakPtr() { |
| 1284 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); | 1290 DCHECK(worker_task_runner_->RunsTasksOnCurrentThread()); |
| 1285 DCHECK(context_); | 1291 DCHECK(context_); |
| 1286 return context_->weak_factory.GetWeakPtr(); | 1292 return context_->weak_factory.GetWeakPtr(); |
| 1287 } | 1293 } |
| 1288 | 1294 |
| 1289 } // namespace content | 1295 } // namespace content |
| OLD | NEW |