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

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

Issue 2910473005: Deprecate NonThreadSafe in net/ in favor of SequenceChecker/ThreadChecker. (Closed)
Patch Set: rebase on r476634 Created 3 years, 6 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/dns/mock_host_resolver.cc ('k') | net/http/http_auth_controller.cc » ('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) 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 #ifndef NET_HTTP_HTTP_AUTH_CONTROLLER_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_CONTROLLER_H_
6 #define NET_HTTP_HTTP_AUTH_CONTROLLER_H_ 6 #define NET_HTTP_HTTP_AUTH_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/thread_checker.h"
14 #include "net/base/completion_callback.h" 14 #include "net/base/completion_callback.h"
15 #include "net/base/net_export.h" 15 #include "net/base/net_export.h"
16 #include "net/http/http_auth.h" 16 #include "net/http/http_auth.h"
17 #include "url/gurl.h" 17 #include "url/gurl.h"
18 18
19 namespace net { 19 namespace net {
20 20
21 class AuthChallengeInfo; 21 class AuthChallengeInfo;
22 class AuthCredentials; 22 class AuthCredentials;
23 class HttpAuthHandler; 23 class HttpAuthHandler;
24 class HttpAuthHandlerFactory; 24 class HttpAuthHandlerFactory;
25 class HttpAuthCache; 25 class HttpAuthCache;
26 class HttpRequestHeaders; 26 class HttpRequestHeaders;
27 class NetLogWithSource; 27 class NetLogWithSource;
28 struct HttpRequestInfo; 28 struct HttpRequestInfo;
29 class SSLInfo; 29 class SSLInfo;
30 30
31 class NET_EXPORT_PRIVATE HttpAuthController 31 class NET_EXPORT_PRIVATE HttpAuthController
32 : public base::RefCounted<HttpAuthController>, 32 : public base::RefCounted<HttpAuthController> {
33 NON_EXPORTED_BASE(public base::NonThreadSafe) {
34 public: 33 public:
35 // The arguments are self explanatory except possibly for |auth_url|, which 34 // The arguments are self explanatory except possibly for |auth_url|, which
36 // should be both the auth target and auth path in a single url argument. 35 // should be both the auth target and auth path in a single url argument.
37 HttpAuthController(HttpAuth::Target target, 36 HttpAuthController(HttpAuth::Target target,
38 const GURL& auth_url, 37 const GURL& auth_url,
39 HttpAuthCache* http_auth_cache, 38 HttpAuthCache* http_auth_cache,
40 HttpAuthHandlerFactory* http_auth_handler_factory); 39 HttpAuthHandlerFactory* http_auth_handler_factory);
41 40
42 // Generate an authentication token for |target| if necessary. The return 41 // Generate an authentication token for |target| if necessary. The return
43 // value is a net error code. |OK| will be returned both in the case that 42 // value is a net error code. |OK| will be returned both in the case that
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 162
164 // These two are owned by the HttpNetworkSession/IOThread, which own the 163 // These two are owned by the HttpNetworkSession/IOThread, which own the
165 // objects which reference |this|. Therefore, these raw pointers are valid 164 // objects which reference |this|. Therefore, these raw pointers are valid
166 // for the lifetime of this object. 165 // for the lifetime of this object.
167 HttpAuthCache* const http_auth_cache_; 166 HttpAuthCache* const http_auth_cache_;
168 HttpAuthHandlerFactory* const http_auth_handler_factory_; 167 HttpAuthHandlerFactory* const http_auth_handler_factory_;
169 168
170 std::set<HttpAuth::Scheme> disabled_schemes_; 169 std::set<HttpAuth::Scheme> disabled_schemes_;
171 170
172 CompletionCallback callback_; 171 CompletionCallback callback_;
172
173 THREAD_CHECKER(thread_checker_);
173 }; 174 };
174 175
175 } // namespace net 176 } // namespace net
176 177
177 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ 178 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_
OLDNEW
« no previous file with comments | « net/dns/mock_host_resolver.cc ('k') | net/http/http_auth_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698