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

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: Cleanup and added one more histogram 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 blob_builder.AppendFileSystemFile(element.filesystem_url(), 473 blob_builder.AppendFileSystemFile(element.filesystem_url(),
474 element.offset(), element.length(), 474 element.offset(), element.length(),
475 element.expected_modification_time()); 475 element.expected_modification_time());
476 break; 476 break;
477 default: 477 default:
478 NOTIMPLEMENTED(); 478 NOTIMPLEMENTED();
479 } 479 }
480 } 480 }
481 481
482 request_body_blob_data_handle_ = 482 request_body_blob_data_handle_ =
483 blob_storage_context_->AddFinishedBlob(blob_builder); 483 blob_storage_context_->AddFinishedBlob(&blob_builder);
484 *blob_uuid = uuid; 484 *blob_uuid = uuid;
485 *blob_size = total_size; 485 *blob_size = total_size;
486 return true; 486 return true;
487 } 487 }
488 488
489 void ServiceWorkerURLRequestJob::DidPrepareFetchEvent() { 489 void ServiceWorkerURLRequestJob::DidPrepareFetchEvent() {
490 fetch_ready_time_ = base::TimeTicks::Now(); 490 fetch_ready_time_ = base::TimeTicks::Now();
491 } 491 }
492 492
493 void ServiceWorkerURLRequestJob::DidDispatchFetchEvent( 493 void ServiceWorkerURLRequestJob::DidDispatchFetchEvent(
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 } 650 }
651 if (!waiting_stream_url_.is_empty()) { 651 if (!waiting_stream_url_.is_empty()) {
652 StreamRegistry* stream_registry = 652 StreamRegistry* stream_registry =
653 GetStreamContextForResourceContext(resource_context_)->registry(); 653 GetStreamContextForResourceContext(resource_context_)->registry();
654 stream_registry->RemoveRegisterObserver(waiting_stream_url_); 654 stream_registry->RemoveRegisterObserver(waiting_stream_url_);
655 stream_registry->AbortPendingStream(waiting_stream_url_); 655 stream_registry->AbortPendingStream(waiting_stream_url_);
656 } 656 }
657 } 657 }
658 658
659 } // namespace content 659 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698