| OLD | NEW | 
|---|
| 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/url_request/url_fetcher_core.h" | 5 #include "net/url_request/url_fetcher_core.h" | 
| 6 | 6 | 
| 7 #include <stdint.h> | 7 #include <stdint.h> | 
| 8 | 8 | 
| 9 #include "base/bind.h" | 9 #include "base/bind.h" | 
| 10 #include "base/logging.h" | 10 #include "base/logging.h" | 
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 564     // run after the URLFetcher was already stopped. | 564     // run after the URLFetcher was already stopped. | 
| 565     return; | 565     return; | 
| 566   } | 566   } | 
| 567 | 567 | 
| 568   DCHECK(request_context_getter_.get()); | 568   DCHECK(request_context_getter_.get()); | 
| 569   DCHECK(!request_.get()); | 569   DCHECK(!request_.get()); | 
| 570 | 570 | 
| 571   g_registry.Get().AddURLFetcherCore(this); | 571   g_registry.Get().AddURLFetcherCore(this); | 
| 572   current_response_bytes_ = 0; | 572   current_response_bytes_ = 0; | 
| 573   request_ = request_context_getter_->GetURLRequestContext()->CreateRequest( | 573   request_ = request_context_getter_->GetURLRequestContext()->CreateRequest( | 
| 574       original_url_, DEFAULT_PRIORITY, this, NULL); | 574       original_url_, DEFAULT_PRIORITY, this); | 
| 575   request_->set_stack_trace(stack_trace_); | 575   request_->set_stack_trace(stack_trace_); | 
| 576   int flags = request_->load_flags() | load_flags_; | 576   int flags = request_->load_flags() | load_flags_; | 
| 577 | 577 | 
| 578   // TODO(pkasting): Remove ScopedTracker below once crbug.com/456327 is fixed. | 578   // TODO(pkasting): Remove ScopedTracker below once crbug.com/456327 is fixed. | 
| 579   tracked_objects::ScopedTracker tracking_profile2( | 579   tracked_objects::ScopedTracker tracking_profile2( | 
| 580       FROM_HERE_WITH_EXPLICIT_FUNCTION( | 580       FROM_HERE_WITH_EXPLICIT_FUNCTION( | 
| 581           "456327 URLFetcherCore::StartURLRequest2")); | 581           "456327 URLFetcherCore::StartURLRequest2")); | 
| 582   if (is_chunked_upload_) | 582   if (is_chunked_upload_) | 
| 583     request_->EnableChunkedUpload(); | 583     request_->EnableChunkedUpload(); | 
| 584   request_->SetLoadFlags(flags); | 584   request_->SetLoadFlags(flags); | 
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 988 } | 988 } | 
| 989 | 989 | 
| 990 void URLFetcherCore::AssertHasNoUploadData() const { | 990 void URLFetcherCore::AssertHasNoUploadData() const { | 
| 991   DCHECK(!upload_content_set_); | 991   DCHECK(!upload_content_set_); | 
| 992   DCHECK(upload_content_.empty()); | 992   DCHECK(upload_content_.empty()); | 
| 993   DCHECK(upload_file_path_.empty()); | 993   DCHECK(upload_file_path_.empty()); | 
| 994   DCHECK(upload_stream_factory_.is_null()); | 994   DCHECK(upload_stream_factory_.is_null()); | 
| 995 } | 995 } | 
| 996 | 996 | 
| 997 }  // namespace net | 997 }  // namespace net | 
| OLD | NEW | 
|---|