| 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/base/network_delegate.h" | 5 #include "net/base/network_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "net/base/load_flags.h" | 8 #include "net/base/load_flags.h" |
| 9 #include "net/url_request/url_request.h" | 9 #include "net/url_request/url_request.h" |
| 10 | 10 |
| 11 namespace net { | 11 namespace net { |
| 12 | 12 |
| 13 void NetworkDelegate::NotifyBeforePreconnect(const GURL& url) { |
| 14 DCHECK(CalledOnValidThread()); |
| 15 OnBeforePreconnect(url); |
| 16 } |
| 17 |
| 13 int NetworkDelegate::NotifyBeforeURLRequest( | 18 int NetworkDelegate::NotifyBeforeURLRequest( |
| 14 URLRequest* request, const CompletionCallback& callback, | 19 URLRequest* request, const CompletionCallback& callback, |
| 15 GURL* new_url) { | 20 GURL* new_url) { |
| 16 DCHECK(CalledOnValidThread()); | 21 DCHECK(CalledOnValidThread()); |
| 17 DCHECK(request); | 22 DCHECK(request); |
| 18 DCHECK(!callback.is_null()); | 23 DCHECK(!callback.is_null()); |
| 19 return OnBeforeURLRequest(request, callback, new_url); | 24 return OnBeforeURLRequest(request, callback, new_url); |
| 20 } | 25 } |
| 21 | 26 |
| 22 int NetworkDelegate::NotifyBeforeSendHeaders( | 27 int NetworkDelegate::NotifyBeforeSendHeaders( |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return OnBeforeSocketStreamConnect(socket, callback); | 146 return OnBeforeSocketStreamConnect(socket, callback); |
| 142 } | 147 } |
| 143 | 148 |
| 144 void NetworkDelegate::NotifyRequestWaitStateChange(const URLRequest& request, | 149 void NetworkDelegate::NotifyRequestWaitStateChange(const URLRequest& request, |
| 145 RequestWaitState state) { | 150 RequestWaitState state) { |
| 146 DCHECK(CalledOnValidThread()); | 151 DCHECK(CalledOnValidThread()); |
| 147 OnRequestWaitStateChange(request, state); | 152 OnRequestWaitStateChange(request, state); |
| 148 } | 153 } |
| 149 | 154 |
| 150 } // namespace net | 155 } // namespace net |
| OLD | NEW |