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

Side by Side Diff: content/browser/service_worker/service_worker_url_request_job.cc

Issue 895933007: [Storage] Blob items are now shared between blobs. Ready for disk swap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698