Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Side by Side Diff: net/http/http_auth_sspi_win.h

Issue 1604011: Use HttpRequestHeaders for extra_headers. (Closed)
Patch Set: Address eroman comments. Created 10 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/http/http_auth_handler.h ('k') | net/http/http_basic_stream.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file contains common routines used by NTLM and Negotiate authentication 5 // This file contains common routines used by NTLM and Negotiate authentication
6 // using the SSPI API on Windows. 6 // using the SSPI API on Windows.
7 7
8 #ifndef NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 8 #ifndef NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
9 #define NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 9 #define NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
10 10
11 // security.h needs to be included for CredHandle. Unfortunately CredHandle 11 // security.h needs to be included for CredHandle. Unfortunately CredHandle
12 // is a typedef and can't be forward declared. 12 // is a typedef and can't be forward declared.
13 #define SECURITY_WIN32 1 13 #define SECURITY_WIN32 1
14 #include <windows.h> 14 #include <windows.h>
15 #include <security.h> 15 #include <security.h>
16 16
17 #include <string> 17 #include <string>
18 18
19 #include "net/http/http_auth.h" 19 #include "net/http/http_auth.h"
20 20
21 class GURL; 21 class GURL;
22 22
23 namespace net { 23 namespace net {
24 24
25 class HttpRequestInfo; 25 struct HttpRequestInfo;
26 class ProxyInfo; 26 class ProxyInfo;
27 27
28 // SSPILibrary is introduced so unit tests can mock the calls to Windows' SSPI 28 // SSPILibrary is introduced so unit tests can mock the calls to Windows' SSPI
29 // implementation. The default implementation simply passes the arguments on to 29 // implementation. The default implementation simply passes the arguments on to
30 // the SSPI implementation provided by Secur32.dll. 30 // the SSPI implementation provided by Secur32.dll.
31 // NOTE(cbentzel): I considered replacing the Secur32.dll with a mock DLL, but 31 // NOTE(cbentzel): I considered replacing the Secur32.dll with a mock DLL, but
32 // decided that it wasn't worth the effort as this is unlikely to be performance 32 // decided that it wasn't worth the effort as this is unlikely to be performance
33 // sensitive code. 33 // sensitive code.
34 class SSPILibrary { 34 class SSPILibrary {
35 public: 35 public:
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // If the return value is ERR_UNEXPECTED, there was an unanticipated problem 145 // If the return value is ERR_UNEXPECTED, there was an unanticipated problem
146 // in the underlying SSPI call. The details are logged, and |*max_token_length| 146 // in the underlying SSPI call. The details are logged, and |*max_token_length|
147 // is not changed. 147 // is not changed.
148 int DetermineMaxTokenLength(SSPILibrary* library, 148 int DetermineMaxTokenLength(SSPILibrary* library,
149 const std::wstring& package, 149 const std::wstring& package,
150 ULONG* max_token_length); 150 ULONG* max_token_length);
151 151
152 } // namespace net 152 } // namespace net
153 153
154 #endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_ 154 #endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_
155
OLDNEW
« no previous file with comments | « net/http/http_auth_handler.h ('k') | net/http/http_basic_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698