| 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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 | 438 |
| 439 if (g_ignore_certificate_requests) { | 439 if (g_ignore_certificate_requests) { |
| 440 request->ContinueWithCertificate(NULL); | 440 request->ContinueWithCertificate(NULL); |
| 441 } else { | 441 } else { |
| 442 request->Cancel(); | 442 request->Cancel(); |
| 443 } | 443 } |
| 444 } | 444 } |
| 445 | 445 |
| 446 void URLFetcherCore::OnReadCompleted(URLRequest* request, | 446 void URLFetcherCore::OnReadCompleted(URLRequest* request, |
| 447 int bytes_read) { | 447 int bytes_read) { |
| 448 DCHECK(request == request_); | 448 DCHECK_EQ(request, request_.get()); |
| 449 DCHECK(network_task_runner_->BelongsToCurrentThread()); | 449 DCHECK(network_task_runner_->BelongsToCurrentThread()); |
| 450 | 450 |
| 451 if (!stopped_on_redirect_) | 451 if (!stopped_on_redirect_) |
| 452 url_ = request->url(); | 452 url_ = request->url(); |
| 453 URLRequestThrottlerManager* throttler_manager = | 453 URLRequestThrottlerManager* throttler_manager = |
| 454 request->context()->throttler_manager(); | 454 request->context()->throttler_manager(); |
| 455 if (throttler_manager) | 455 if (throttler_manager) |
| 456 url_throttler_entry_ = throttler_manager->RegisterRequestUrl(url_); | 456 url_throttler_entry_ = throttler_manager->RegisterRequestUrl(url_); |
| 457 | 457 |
| 458 do { | 458 do { |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 949 } | 949 } |
| 950 | 950 |
| 951 void URLFetcherCore::AssertHasNoUploadData() const { | 951 void URLFetcherCore::AssertHasNoUploadData() const { |
| 952 DCHECK(!upload_content_set_); | 952 DCHECK(!upload_content_set_); |
| 953 DCHECK(upload_content_.empty()); | 953 DCHECK(upload_content_.empty()); |
| 954 DCHECK(upload_file_path_.empty()); | 954 DCHECK(upload_file_path_.empty()); |
| 955 DCHECK(upload_stream_factory_.is_null()); | 955 DCHECK(upload_stream_factory_.is_null()); |
| 956 } | 956 } |
| 957 | 957 |
| 958 } // namespace net | 958 } // namespace net |
| OLD | NEW |