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

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

Issue 6191001: Cleanup: Use AUTH_SCHEME enum instead of a string. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Merge with trunk 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/http/http_auth_cache_unittest.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) 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_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 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Store the supplied credentials and prepare to restart the auth. 62 // Store the supplied credentials and prepare to restart the auth.
63 virtual void ResetAuth(const string16& username, 63 virtual void ResetAuth(const string16& username,
64 const string16& password); 64 const string16& password);
65 65
66 virtual bool HaveAuthHandler() const; 66 virtual bool HaveAuthHandler() const;
67 67
68 virtual bool HaveAuth() const; 68 virtual bool HaveAuth() const;
69 69
70 virtual scoped_refptr<AuthChallengeInfo> auth_info(); 70 virtual scoped_refptr<AuthChallengeInfo> auth_info();
71 71
72 virtual bool IsAuthSchemeDisabled(const std::string& scheme) const; 72 virtual bool IsAuthSchemeDisabled(HttpAuth::Scheme scheme) const;
73 virtual void DisableAuthScheme(const std::string& scheme); 73 virtual void DisableAuthScheme(HttpAuth::Scheme scheme);
74 74
75 private: 75 private:
76 // So that we can mock this object. 76 // So that we can mock this object.
77 friend class base::RefCounted<HttpAuthController>; 77 friend class base::RefCounted<HttpAuthController>;
78 78
79 virtual ~HttpAuthController(); 79 virtual ~HttpAuthController();
80 80
81 // Searches the auth cache for an entry that encompasses the request's path. 81 // Searches the auth cache for an entry that encompasses the request's path.
82 // If such an entry is found, updates |identity_| and |handler_| with the 82 // If such an entry is found, updates |identity_| and |handler_| with the
83 // cache entry's data and returns true. 83 // cache entry's data and returns true.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // True if default credentials have already been tried for this transaction 139 // True if default credentials have already been tried for this transaction
140 // in response to an HTTP authentication challenge. 140 // in response to an HTTP authentication challenge.
141 bool default_credentials_used_; 141 bool default_credentials_used_;
142 142
143 // These two are owned by the HttpNetworkSession/IOThread, which own the 143 // These two are owned by the HttpNetworkSession/IOThread, which own the
144 // objects which reference |this|. Therefore, these raw pointers are valid 144 // objects which reference |this|. Therefore, these raw pointers are valid
145 // for the lifetime of this object. 145 // for the lifetime of this object.
146 HttpAuthCache* const http_auth_cache_; 146 HttpAuthCache* const http_auth_cache_;
147 HttpAuthHandlerFactory* const http_auth_handler_factory_; 147 HttpAuthHandlerFactory* const http_auth_handler_factory_;
148 148
149 std::set<std::string> disabled_schemes_; 149 std::set<HttpAuth::Scheme> disabled_schemes_;
150 150
151 CompletionCallbackImpl<HttpAuthController> io_callback_; 151 CompletionCallbackImpl<HttpAuthController> io_callback_;
152 CompletionCallback* user_callback_; 152 CompletionCallback* user_callback_;
153 }; 153 };
154 154
155 } // namespace net 155 } // namespace net
156 156
157 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_ 157 #endif // NET_HTTP_HTTP_AUTH_CONTROLLER_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_cache_unittest.cc ('k') | net/http/http_auth_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698