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

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

Issue 6341004: More net/ reordering. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Window gyp dependency Created 9 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « net/base/test_completion_callback_unittest.cc ('k') | net/http/http_cache.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 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
6 #define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ 6 #define NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 10 matching lines...) Expand all
21 class BoundNetLog; 21 class BoundNetLog;
22 class HostResolver; 22 class HostResolver;
23 class HttpAuthHandler; 23 class HttpAuthHandler;
24 class HttpAuthHandlerRegistryFactory; 24 class HttpAuthHandlerRegistryFactory;
25 25
26 // An HttpAuthHandlerFactory is used to create HttpAuthHandler objects. 26 // An HttpAuthHandlerFactory is used to create HttpAuthHandler objects.
27 // The HttpAuthHandlerFactory object _must_ outlive any of the HttpAuthHandler 27 // The HttpAuthHandlerFactory object _must_ outlive any of the HttpAuthHandler
28 // objects that it creates. 28 // objects that it creates.
29 class HttpAuthHandlerFactory { 29 class HttpAuthHandlerFactory {
30 public: 30 public:
31 enum CreateReason {
32 CREATE_CHALLENGE, // Create a handler in response to a challenge.
33 CREATE_PREEMPTIVE, // Create a handler preemptively.
34 };
35
31 HttpAuthHandlerFactory() : url_security_manager_(NULL) {} 36 HttpAuthHandlerFactory() : url_security_manager_(NULL) {}
32 virtual ~HttpAuthHandlerFactory() {} 37 virtual ~HttpAuthHandlerFactory() {}
33 38
34 // Sets an URL security manager. HttpAuthHandlerFactory doesn't own the URL 39 // Sets an URL security manager. HttpAuthHandlerFactory doesn't own the URL
35 // security manager, and the URL security manager should outlive this object. 40 // security manager, and the URL security manager should outlive this object.
36 void set_url_security_manager(URLSecurityManager* url_security_manager) { 41 void set_url_security_manager(URLSecurityManager* url_security_manager) {
37 url_security_manager_ = url_security_manager; 42 url_security_manager_ = url_security_manager;
38 } 43 }
39 44
40 // Retrieves the associated URL security manager. 45 // Retrieves the associated URL security manager.
41 URLSecurityManager* url_security_manager() { 46 URLSecurityManager* url_security_manager() {
42 return url_security_manager_; 47 return url_security_manager_;
43 } 48 }
44 49
45 enum CreateReason {
46 CREATE_CHALLENGE, // Create a handler in response to a challenge.
47 CREATE_PREEMPTIVE, // Create a handler preemptively.
48 };
49
50 // Creates an HttpAuthHandler object based on the authentication 50 // Creates an HttpAuthHandler object based on the authentication
51 // challenge specified by |*challenge|. |challenge| must point to a valid 51 // challenge specified by |*challenge|. |challenge| must point to a valid
52 // non-NULL tokenizer. 52 // non-NULL tokenizer.
53 // 53 //
54 // If an HttpAuthHandler object is successfully created it is passed back to 54 // If an HttpAuthHandler object is successfully created it is passed back to
55 // the caller through |*handler| and OK is returned. 55 // the caller through |*handler| and OK is returned.
56 // 56 //
57 // If |*challenge| specifies an unsupported authentication scheme, |*handler| 57 // If |*challenge| specifies an unsupported authentication scheme, |*handler|
58 // is set to NULL and ERR_UNSUPPORTED_AUTH_SCHEME is returned. 58 // is set to NULL and ERR_UNSUPPORTED_AUTH_SCHEME is returned.
59 // 59 //
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 private: 192 private:
193 typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap; 193 typedef std::map<std::string, HttpAuthHandlerFactory*> FactoryMap;
194 194
195 FactoryMap factory_map_; 195 FactoryMap factory_map_;
196 DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory); 196 DISALLOW_COPY_AND_ASSIGN(HttpAuthHandlerRegistryFactory);
197 }; 197 };
198 198
199 } // namespace net 199 } // namespace net
200 200
201 #endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_ 201 #endif // NET_HTTP_HTTP_AUTH_HANDLER_FACTORY_H_
OLDNEW
« no previous file with comments | « net/base/test_completion_callback_unittest.cc ('k') | net/http/http_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698