OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/http/http_transaction_winhttp.h" | 5 #include "net/http/http_transaction_winhttp.h" |
6 | 6 |
7 #include <winhttp.h> | 7 #include <winhttp.h> |
8 | 8 |
9 #include "base/lock.h" | 9 #include "base/lock.h" |
10 #include "base/memory_debug.h" | 10 #include "base/memory_debug.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "net/base/ssl_config_service.h" | 22 #include "net/base/ssl_config_service.h" |
23 #include "net/base/upload_data_stream.h" | 23 #include "net/base/upload_data_stream.h" |
24 #include "net/http/cert_status_cache.h" | 24 #include "net/http/cert_status_cache.h" |
25 #include "net/http/http_request_info.h" | 25 #include "net/http/http_request_info.h" |
26 #include "net/http/winhttp_request_throttle.h" | 26 #include "net/http/winhttp_request_throttle.h" |
27 #include "net/proxy/proxy_resolver_winhttp.h" | 27 #include "net/proxy/proxy_resolver_winhttp.h" |
28 | 28 |
29 #pragma comment(lib, "winhttp.lib") | 29 #pragma comment(lib, "winhttp.lib") |
30 #pragma warning(disable: 4355) | 30 #pragma warning(disable: 4355) |
31 | 31 |
| 32 using base::Time; |
| 33 |
32 namespace net { | 34 namespace net { |
33 | 35 |
34 static int TranslateOSError(DWORD error) { | 36 static int TranslateOSError(DWORD error) { |
35 switch (error) { | 37 switch (error) { |
36 case ERROR_SUCCESS: | 38 case ERROR_SUCCESS: |
37 return OK; | 39 return OK; |
38 case ERROR_FILE_NOT_FOUND: | 40 case ERROR_FILE_NOT_FOUND: |
39 return ERR_FILE_NOT_FOUND; | 41 return ERR_FILE_NOT_FOUND; |
40 case ERROR_HANDLE_EOF: // TODO(wtc): return OK? | 42 case ERROR_HANDLE_EOF: // TODO(wtc): return OK? |
41 return ERR_CONNECTION_CLOSED; | 43 return ERR_CONNECTION_CLOSED; |
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1786 | 1788 |
1787 if (rv == ERR_IO_PENDING) { | 1789 if (rv == ERR_IO_PENDING) { |
1788 session_callback_->AddRef(); // balanced when callback runs. | 1790 session_callback_->AddRef(); // balanced when callback runs. |
1789 } else if (callback_) { | 1791 } else if (callback_) { |
1790 DoCallback(rv); | 1792 DoCallback(rv); |
1791 } | 1793 } |
1792 } | 1794 } |
1793 | 1795 |
1794 } // namespace net | 1796 } // namespace net |
1795 | 1797 |
OLD | NEW |