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_url_request_job.h" | 5 #include "content/browser/service_worker/service_worker_url_request_job.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 blob_builder.AppendFileSystemFile(element.filesystem_url(), | 471 blob_builder.AppendFileSystemFile(element.filesystem_url(), |
472 element.offset(), element.length(), | 472 element.offset(), element.length(), |
473 element.expected_modification_time()); | 473 element.expected_modification_time()); |
474 break; | 474 break; |
475 default: | 475 default: |
476 NOTIMPLEMENTED(); | 476 NOTIMPLEMENTED(); |
477 } | 477 } |
478 } | 478 } |
479 | 479 |
480 request_body_blob_data_handle_ = | 480 request_body_blob_data_handle_ = |
481 blob_storage_context_->AddFinishedBlob(blob_builder); | 481 blob_storage_context_->AddFinishedBlob(&blob_builder); |
482 *blob_uuid = uuid; | 482 *blob_uuid = uuid; |
483 *blob_size = total_size; | 483 *blob_size = total_size; |
484 return true; | 484 return true; |
485 } | 485 } |
486 | 486 |
487 void ServiceWorkerURLRequestJob::DidPrepareFetchEvent() { | 487 void ServiceWorkerURLRequestJob::DidPrepareFetchEvent() { |
488 fetch_ready_time_ = base::TimeTicks::Now(); | 488 fetch_ready_time_ = base::TimeTicks::Now(); |
489 } | 489 } |
490 | 490 |
491 void ServiceWorkerURLRequestJob::DidDispatchFetchEvent( | 491 void ServiceWorkerURLRequestJob::DidDispatchFetchEvent( |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 } | 635 } |
636 if (!waiting_stream_url_.is_empty()) { | 636 if (!waiting_stream_url_.is_empty()) { |
637 StreamRegistry* stream_registry = | 637 StreamRegistry* stream_registry = |
638 GetStreamContextForResourceContext(resource_context_)->registry(); | 638 GetStreamContextForResourceContext(resource_context_)->registry(); |
639 stream_registry->RemoveRegisterObserver(waiting_stream_url_); | 639 stream_registry->RemoveRegisterObserver(waiting_stream_url_); |
640 stream_registry->AbortPendingStream(waiting_stream_url_); | 640 stream_registry->AbortPendingStream(waiting_stream_url_); |
641 } | 641 } |
642 } | 642 } |
643 | 643 |
644 } // namespace content | 644 } // namespace content |
OLD | NEW |