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

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

Issue 6525035: Invalidate credentials if the server rejects them. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Extra whitespace Created 9 years, 10 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
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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
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.
84 bool SelectPreemptiveAuth(const BoundNetLog& net_log); 84 bool SelectPreemptiveAuth(const BoundNetLog& net_log);
85 85
86 // Invalidates the current handler, including cache. 86 // Invalidates the current handler, including cache.
87 void InvalidateCurrentHandler(); 87 void InvalidateCurrentHandler(bool invalidate_credentials);
cbentzel 2011/02/16 20:51:39 I prefer enum over boolean so call sites are clear
asanka 2011/02/16 22:39:19 Done.
88 88
89 // Invalidates any auth cache entries after authentication has failed. 89 // Invalidates any auth cache entries after authentication has failed.
90 // The identity that was rejected is |identity_|. 90 // The identity that was rejected is |identity_|.
91 void InvalidateRejectedAuthFromCache(); 91 void InvalidateRejectedAuthFromCache();
92 92
93 // Sets |identity_| to the next identity that the transaction should try. It 93 // Sets |identity_| to the next identity that the transaction should try. It
94 // chooses candidates by searching the auth cache and the URL for a 94 // chooses candidates by searching the auth cache and the URL for a
95 // username:password. Returns true if an identity was found. 95 // username:password. Returns true if an identity was found.
96 bool SelectNextAuthIdentityToTry(); 96 bool SelectNextAuthIdentityToTry();
97 97
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 std::set<HttpAuth::Scheme> 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

Powered by Google App Engine
This is Rietveld 408576698