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

Side by Side Diff: net/base/upload_data_stream.cc

Issue 2330983002: Removes get upload progress plumbing. URLRequest queries the UploadDataStream directly. (Closed)
Patch Set: Feedback incorporated. Created 4 years, 3 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
« no previous file with comments | « net/base/upload_data_stream.h ('k') | net/http/failing_http_transaction_factory.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "net/base/upload_data_stream.h" 5 #include "net/base/upload_data_stream.h"
6 6
7 #include "base/callback_helpers.h" 7 #include "base/callback_helpers.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "net/base/io_buffer.h" 10 #include "net/base/io_buffer.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 } 181 }
182 } 182 }
183 183
184 net_log_.EndEventWithNetErrorCode(NetLogEventType::UPLOAD_DATA_STREAM_READ, 184 net_log_.EndEventWithNetErrorCode(NetLogEventType::UPLOAD_DATA_STREAM_READ,
185 result); 185 result);
186 186
187 if (!callback_.is_null()) 187 if (!callback_.is_null())
188 base::ResetAndReturn(&callback_).Run(result); 188 base::ResetAndReturn(&callback_).Run(result);
189 } 189 }
190 190
191 UploadProgress UploadDataStream::GetUploadProgress() const {
192 // While initialization / rewinding is in progress, return nothing.
193 if (!initialized_successfully_)
194 return UploadProgress();
195
196 return UploadProgress(current_position_, total_size_);
197 }
198
191 } // namespace net 199 } // namespace net
OLDNEW
« no previous file with comments | « net/base/upload_data_stream.h ('k') | net/http/failing_http_transaction_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698