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

Side by Side Diff: content/child/url_loader_client_impl.cc

Issue 2574143003: Implement upload progress handling in Mojo loading (Closed)
Patch Set: +#include. +forward decl. +DISALLOW_COPY_AND_ASSIGN. Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/child/url_loader_client_impl.h" 5 #include "content/child/url_loader_client_impl.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "content/child/resource_dispatcher.h" 9 #include "content/child/resource_dispatcher.h"
10 #include "content/child/url_response_body_consumer.h" 10 #include "content/child/url_response_body_consumer.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 if (is_deferred_) { 171 if (is_deferred_) {
172 deferred_messages_.push_back(message); 172 deferred_messages_.push_back(message);
173 } else if (deferred_messages_.size() > 0) { 173 } else if (deferred_messages_.size() > 0) {
174 deferred_messages_.push_back(message); 174 deferred_messages_.push_back(message);
175 FlushDeferredMessages(); 175 FlushDeferredMessages();
176 } else { 176 } else {
177 resource_dispatcher_->DispatchMessage(message); 177 resource_dispatcher_->DispatchMessage(message);
178 } 178 }
179 } 179 }
180 180
181 void URLLoaderClientImpl::OnUploadProgress(int64_t current_position,
182 int64_t total_size,
183 const base::Closure& ack_callback) {
184 resource_dispatcher_->OnMessageReceived(
kinuko 2017/01/23 08:23:03 Could we / should we use Dispatch() instead?
tzik 2017/01/23 09:34:17 Done.
185 ResourceMsg_UploadProgress(request_id_, current_position, total_size));
186 ack_callback.Run();
187 }
188
181 } // namespace content 189 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698