| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_request.h" | 5 #include "net/url_request/url_request.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/memory/singleton.h" | 8 #include "base/memory/singleton.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/metrics/stats_counters.h" | 10 #include "base/metrics/stats_counters.h" |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 base::Lock g_next_url_request_identifier_lock; | 55 base::Lock g_next_url_request_identifier_lock; |
| 56 | 56 |
| 57 // Returns an prior unused identifier for URL requests. | 57 // Returns an prior unused identifier for URL requests. |
| 58 uint64 GenerateURLRequestIdentifier() { | 58 uint64 GenerateURLRequestIdentifier() { |
| 59 base::AutoLock lock(g_next_url_request_identifier_lock); | 59 base::AutoLock lock(g_next_url_request_identifier_lock); |
| 60 return g_next_url_request_identifier++; | 60 return g_next_url_request_identifier++; |
| 61 } | 61 } |
| 62 | 62 |
| 63 } // namespace | 63 } // namespace |
| 64 | 64 |
| 65 URLRequest::ProtocolFactory* |
| 66 URLRequest::Deprecated::RegisterProtocolFactory(const std::string& scheme, |
| 67 ProtocolFactory* factory) { |
| 68 return URLRequest::RegisterProtocolFactory(scheme, factory); |
| 69 } |
| 70 |
| 71 void URLRequest::Deprecated::RegisterRequestInterceptor( |
| 72 Interceptor* interceptor) { |
| 73 URLRequest::RegisterRequestInterceptor(interceptor); |
| 74 } |
| 75 |
| 76 void URLRequest::Deprecated::UnregisterRequestInterceptor( |
| 77 Interceptor* interceptor) { |
| 78 URLRequest::UnregisterRequestInterceptor(interceptor); |
| 79 } |
| 80 |
| 65 /////////////////////////////////////////////////////////////////////////////// | 81 /////////////////////////////////////////////////////////////////////////////// |
| 66 // URLRequest::Interceptor | 82 // URLRequest::Interceptor |
| 67 | 83 |
| 68 URLRequestJob* URLRequest::Interceptor::MaybeInterceptRedirect( | 84 URLRequestJob* URLRequest::Interceptor::MaybeInterceptRedirect( |
| 69 URLRequest* request, | 85 URLRequest* request, |
| 70 const GURL& location) { | 86 const GURL& location) { |
| 71 return NULL; | 87 return NULL; |
| 72 } | 88 } |
| 73 | 89 |
| 74 URLRequestJob* URLRequest::Interceptor::MaybeInterceptResponse( | 90 URLRequestJob* URLRequest::Interceptor::MaybeInterceptResponse( |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 // not be needed. | 796 // not be needed. |
| 781 if (has_notified_completion_) | 797 if (has_notified_completion_) |
| 782 return; | 798 return; |
| 783 | 799 |
| 784 has_notified_completion_ = true; | 800 has_notified_completion_ = true; |
| 785 if (context_ && context_->network_delegate()) | 801 if (context_ && context_->network_delegate()) |
| 786 context_->network_delegate()->NotifyCompleted(this); | 802 context_->network_delegate()->NotifyCompleted(this); |
| 787 } | 803 } |
| 788 | 804 |
| 789 } // namespace net | 805 } // namespace net |
| OLD | NEW |