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

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

Issue 8990001: base::Bind: Convert most of net/http. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang. Created 9 years 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 | Annotate | Revision Log
OLDNEW
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 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_
6 #define NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 HttpAuth::ChallengeTokenizer* challenge) OVERRIDE; 111 HttpAuth::ChallengeTokenizer* challenge) OVERRIDE;
112 virtual bool NeedsIdentity() OVERRIDE; 112 virtual bool NeedsIdentity() OVERRIDE;
113 virtual bool AllowsDefaultCredentials() OVERRIDE; 113 virtual bool AllowsDefaultCredentials() OVERRIDE;
114 virtual bool AllowsExplicitCredentials() OVERRIDE; 114 virtual bool AllowsExplicitCredentials() OVERRIDE;
115 115
116 protected: 116 protected:
117 virtual bool Init(HttpAuth::ChallengeTokenizer* challenge) OVERRIDE; 117 virtual bool Init(HttpAuth::ChallengeTokenizer* challenge) OVERRIDE;
118 118
119 virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials, 119 virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
120 const HttpRequestInfo* request, 120 const HttpRequestInfo* request,
121 OldCompletionCallback* callback, 121 const CompletionCallback& callback,
122 std::string* auth_token) OVERRIDE; 122 std::string* auth_token) OVERRIDE;
123 123
124 private: 124 private:
125 enum State { 125 enum State {
126 STATE_RESOLVE_CANONICAL_NAME, 126 STATE_RESOLVE_CANONICAL_NAME,
127 STATE_RESOLVE_CANONICAL_NAME_COMPLETE, 127 STATE_RESOLVE_CANONICAL_NAME_COMPLETE,
128 STATE_GENERATE_AUTH_TOKEN, 128 STATE_GENERATE_AUTH_TOKEN,
129 STATE_GENERATE_AUTH_TOKEN_COMPLETE, 129 STATE_GENERATE_AUTH_TOKEN_COMPLETE,
130 STATE_NONE, 130 STATE_NONE,
131 }; 131 };
(...skipping 17 matching lines...) Expand all
149 AddressList address_list_; 149 AddressList address_list_;
150 scoped_ptr<SingleRequestHostResolver> single_resolve_; 150 scoped_ptr<SingleRequestHostResolver> single_resolve_;
151 151
152 // Things which should be consistent after first call to GenerateAuthToken. 152 // Things which should be consistent after first call to GenerateAuthToken.
153 bool already_called_; 153 bool already_called_;
154 bool has_credentials_; 154 bool has_credentials_;
155 AuthCredentials credentials_; 155 AuthCredentials credentials_;
156 std::wstring spn_; 156 std::wstring spn_;
157 157
158 // Things which vary each round. 158 // Things which vary each round.
159 OldCompletionCallback* user_callback_; 159 CompletionCallback callback_;
160 std::string* auth_token_; 160 std::string* auth_token_;
161 161
162 State next_state_; 162 State next_state_;
163 163
164 const URLSecurityManager* url_security_manager_; 164 const URLSecurityManager* url_security_manager_;
165 }; 165 };
166 166
167 } // namespace net 167 } // namespace net
168 168
169 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ 169 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698