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

Side by Side Diff: net/socket_stream/socket_stream.cc

Issue 8990001: base::Bind: Convert most of net/http. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clang. Created 9 years 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) 2011 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 // TODO(ukai): code is similar with http_network_transaction.cc. We should 5 // TODO(ukai): code is similar with http_network_transaction.cc. We should
6 // think about ways to share code, if possible. 6 // think about ways to share code, if possible.
7 7
8 #include "net/socket_stream/socket_stream.h" 8 #include "net/socket_stream/socket_stream.h"
9 9
10 #include <set> 10 #include <set>
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 // Support basic authentication scheme only, because we don't have 723 // Support basic authentication scheme only, because we don't have
724 // HttpRequestInfo. 724 // HttpRequestInfo.
725 // TODO(ukai): Add support other authentication scheme. 725 // TODO(ukai): Add support other authentication scheme.
726 if (auth_handler_.get() && 726 if (auth_handler_.get() &&
727 auth_handler_->auth_scheme() == HttpAuth::AUTH_SCHEME_BASIC) { 727 auth_handler_->auth_scheme() == HttpAuth::AUTH_SCHEME_BASIC) {
728 HttpRequestInfo request_info; 728 HttpRequestInfo request_info;
729 std::string auth_token; 729 std::string auth_token;
730 int rv = auth_handler_->GenerateAuthToken( 730 int rv = auth_handler_->GenerateAuthToken(
731 &auth_identity_.credentials, 731 &auth_identity_.credentials,
732 &request_info, 732 &request_info,
733 NULL, 733 CompletionCallback(),
734 &auth_token); 734 &auth_token);
735 // TODO(cbentzel): Support async auth handlers. 735 // TODO(cbentzel): Support async auth handlers.
736 DCHECK_NE(ERR_IO_PENDING, rv); 736 DCHECK_NE(ERR_IO_PENDING, rv);
737 if (rv != OK) 737 if (rv != OK)
738 return rv; 738 return rv;
739 authorization_headers.append( 739 authorization_headers.append(
740 HttpAuth::GetAuthorizationHeaderName(HttpAuth::AUTH_PROXY) + 740 HttpAuth::GetAuthorizationHeaderName(HttpAuth::AUTH_PROXY) +
741 ": " + auth_token + "\r\n"); 741 ": " + auth_token + "\r\n");
742 } 742 }
743 743
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
1185 1185
1186 SSLConfigService* SocketStream::ssl_config_service() const { 1186 SSLConfigService* SocketStream::ssl_config_service() const {
1187 return context_->ssl_config_service(); 1187 return context_->ssl_config_service();
1188 } 1188 }
1189 1189
1190 ProxyService* SocketStream::proxy_service() const { 1190 ProxyService* SocketStream::proxy_service() const {
1191 return context_->proxy_service(); 1191 return context_->proxy_service();
1192 } 1192 }
1193 1193
1194 } // namespace net 1194 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698