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

Side by Side Diff: net/http/http_auth_handler.cc

Issue 7748033: Don't try to use explicit credentials with schemes that don't support it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test Created 9 years, 3 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_handler.h ('k') | net/http/http_auth_handler_mock.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) 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 #include "net/http/http_auth_handler.h" 5 #include "net/http/http_auth_handler.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "net/base/net_errors.h" 8 #include "net/base/net_errors.h"
9 9
10 namespace net { 10 namespace net {
11 11
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 } 83 }
84 84
85 bool HttpAuthHandler::NeedsIdentity() { 85 bool HttpAuthHandler::NeedsIdentity() {
86 return true; 86 return true;
87 } 87 }
88 88
89 bool HttpAuthHandler::AllowsDefaultCredentials() { 89 bool HttpAuthHandler::AllowsDefaultCredentials() {
90 return false; 90 return false;
91 } 91 }
92 92
93 bool HttpAuthHandler::AllowsExplicitCredentials() {
94 return true;
95 }
96
93 void HttpAuthHandler::OnGenerateAuthTokenComplete(int rv) { 97 void HttpAuthHandler::OnGenerateAuthTokenComplete(int rv) {
94 CompletionCallback* callback = original_callback_; 98 CompletionCallback* callback = original_callback_;
95 FinishGenerateAuthToken(); 99 FinishGenerateAuthToken();
96 if (callback) 100 if (callback)
97 callback->Run(rv); 101 callback->Run(rv);
98 } 102 }
99 103
100 void HttpAuthHandler::FinishGenerateAuthToken() { 104 void HttpAuthHandler::FinishGenerateAuthToken() {
101 // TOOD(cbentzel): Should this be done in OK case only? 105 // TOOD(cbentzel): Should this be done in OK case only?
102 net_log_.EndEvent(EventTypeFromAuthTarget(target_), NULL); 106 net_log_.EndEvent(EventTypeFromAuthTarget(target_), NULL);
103 original_callback_ = NULL; 107 original_callback_ = NULL;
104 } 108 }
105 109
106 } // namespace net 110 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_handler.h ('k') | net/http/http_auth_handler_mock.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698