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

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

Issue 2574143003: Implement upload progress handling in Mojo loading (Closed)
Patch Set: +comment Created 3 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_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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // Let the service worker know that the request has been canceled. 80 // Let the service worker know that the request has been canceled.
81 ResourceRequestCompletionStatus status; 81 ResourceRequestCompletionStatus status;
82 status.error_code = net::ERR_ABORTED; 82 status.error_code = net::ERR_ABORTED;
83 client_->OnComplete(status); 83 client_->OnComplete(status);
84 } 84 }
85 } 85 }
86 86
87 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override { 87 void OnDataDownloaded(int64_t data_length, int64_t encoded_length) override {
88 client_->OnDataDownloaded(data_length, encoded_length); 88 client_->OnDataDownloaded(data_length, encoded_length);
89 } 89 }
90 void OnUploadProgress(int64_t current_position,
91 int64_t total_size,
92 const base::Closure& ack_callback) override {
93 client_->OnUploadProgress(current_position, total_size, ack_callback);
94 }
90 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override { 95 void OnReceiveCachedMetadata(const std::vector<uint8_t>& data) override {
91 client_->OnReceiveCachedMetadata(data); 96 client_->OnReceiveCachedMetadata(data);
92 } 97 }
93 void OnTransferSizeUpdated(int32_t transfer_size_diff) override { 98 void OnTransferSizeUpdated(int32_t transfer_size_diff) override {
94 client_->OnTransferSizeUpdated(transfer_size_diff); 99 client_->OnTransferSizeUpdated(transfer_size_diff);
95 } 100 }
96 void OnReceiveResponse( 101 void OnReceiveResponse(
97 const ResourceResponseHead& head, 102 const ResourceResponseHead& head,
98 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file) override { 103 mojom::DownloadedTempFileAssociatedPtrInfo downloaded_file) override {
99 client_->OnReceiveResponse(head, std::move(downloaded_file)); 104 client_->OnReceiveResponse(head, std::move(downloaded_file));
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 ServiceWorkerVersion* version, 515 ServiceWorkerVersion* version,
511 int event_finish_id, 516 int event_finish_id,
512 scoped_refptr<URLLoaderAssets> url_loader_assets, 517 scoped_refptr<URLLoaderAssets> url_loader_assets,
513 ServiceWorkerStatusCode status, 518 ServiceWorkerStatusCode status,
514 base::Time dispatch_event_time) { 519 base::Time dispatch_event_time) {
515 version->FinishRequest(event_finish_id, status != SERVICE_WORKER_ERROR_ABORT, 520 version->FinishRequest(event_finish_id, status != SERVICE_WORKER_ERROR_ABORT,
516 dispatch_event_time); 521 dispatch_event_time);
517 } 522 }
518 523
519 } // namespace content 524 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/upload_progress_tracker_unittest.cc ('k') | content/child/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698