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

Unified Diff: net/url_request/url_request.cc

Issue 10825073: Stop using ScopedAllowIO in content::ResourceDispatcherHostImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request.cc
diff --git a/net/url_request/url_request.cc b/net/url_request/url_request.cc
index 90840531f7d0301ebde8dd1f249c1035c3ef2424..ca66cc0c1e3b17becc2ae1c5e496292d9c96e871 100644
--- a/net/url_request/url_request.cc
+++ b/net/url_request/url_request.cc
@@ -149,7 +149,6 @@ URLRequest::URLRequest(const GURL& url,
delegate_(delegate),
is_pending_(false),
redirect_limit_(kMaxRedirects),
- final_upload_progress_(0),
priority_(LOWEST),
identifier_(GenerateURLRequestIdentifier()),
blocked_on_delegate_(false),
@@ -187,7 +186,6 @@ URLRequest::URLRequest(const GURL& url,
delegate_(delegate),
is_pending_(false),
redirect_limit_(kMaxRedirects),
- final_upload_progress_(0),
priority_(LOWEST),
identifier_(GenerateURLRequestIdentifier()),
blocked_on_delegate_(false),
@@ -327,12 +325,12 @@ LoadStateWithParam URLRequest::GetLoadState() const {
string16());
}
-uint64 URLRequest::GetUploadProgress() const {
+UploadProgress URLRequest::GetUploadProgress() const {
if (!job_) {
// We haven't started or the request was cancelled
- return 0;
+ return UploadProgress();
}
- if (final_upload_progress_) {
+ if (final_upload_progress_.position) {
// The first job completed and none of the subsequent series of
// GETs when following redirects will upload anything, so we return the
// cached results from the initial job, the POST.
@@ -793,7 +791,7 @@ int URLRequest::Redirect(const GURL& location, int http_status_code) {
url_chain_.push_back(location);
--redirect_limit_;
- if (!final_upload_progress_)
+ if (!final_upload_progress_.position)
final_upload_progress_ = job_->GetUploadProgress();
PrepareToRestart();

Powered by Google App Engine
This is Rietveld 408576698