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

Unified Diff: net/http/http_auth_handler.cc

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: net/http/http_auth_handler.cc
diff --git a/net/http/http_auth_handler.cc b/net/http/http_auth_handler.cc
index 7369ea5425fd961e163839aed492bbe4db22650a..4de2226caa24c1b0d1c571e72d93e7a60429ecec 100644
--- a/net/http/http_auth_handler.cc
+++ b/net/http/http_auth_handler.cc
@@ -64,7 +64,7 @@ NetLog::EventType EventTypeFromAuthTarget(HttpAuth::Target target) {
int HttpAuthHandler::GenerateAuthToken(
const AuthCredentials* credentials, const HttpRequestInfo* request,
const CompletionCallback& callback, std::string* auth_token) {
- // TODO(cbentzel): Enforce non-NULL callback after cleaning up SocketStream.
+ DCHECK(!callback.is_null());
DCHECK(request);
DCHECK(credentials != NULL || AllowsDefaultCredentials());
DCHECK(auth_token != NULL);
@@ -96,8 +96,8 @@ bool HttpAuthHandler::AllowsExplicitCredentials() {
void HttpAuthHandler::OnGenerateAuthTokenComplete(int rv) {
CompletionCallback callback = callback_;
FinishGenerateAuthToken();
- if (!callback.is_null())
- callback.Run(rv);
+ DCHECK(!callback.is_null());
+ callback.Run(rv);
}
void HttpAuthHandler::FinishGenerateAuthToken() {
« no previous file with comments | « net/http/disk_cache_based_quic_server_info_unittest.cc ('k') | net/http/http_auth_handler_basic_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698