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

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

Issue 8340026: Use AuthCredentials throughout the network stack instead of username/password. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: mac compile fix Created 9 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 unified diff | Download patch
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 #include "net/http/http_stream_factory_impl_request.h" 5 #include "net/http/http_stream_factory_impl_request.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "net/http/http_stream_factory_impl_job.h" 9 #include "net/http/http_stream_factory_impl_job.h"
10 #include "net/spdy/spdy_http_stream.h" 10 #include "net/spdy/spdy_http_stream.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 HttpStream* stream) { 189 HttpStream* stream) {
190 if (!bound_job_.get()) 190 if (!bound_job_.get())
191 OrphanJobsExcept(job); 191 OrphanJobsExcept(job);
192 else 192 else
193 DCHECK(jobs_.empty()); 193 DCHECK(jobs_.empty());
194 delegate_->OnHttpsProxyTunnelResponse( 194 delegate_->OnHttpsProxyTunnelResponse(
195 response_info, used_ssl_config, used_proxy_info, stream); 195 response_info, used_ssl_config, used_proxy_info, stream);
196 } 196 }
197 197
198 int HttpStreamFactoryImpl::Request::RestartTunnelWithProxyAuth( 198 int HttpStreamFactoryImpl::Request::RestartTunnelWithProxyAuth(
199 const string16& username, 199 const AuthCredentials& credentials) {
200 const string16& password) {
201 DCHECK(bound_job_.get()); 200 DCHECK(bound_job_.get());
202 return bound_job_->RestartTunnelWithProxyAuth(username, password); 201 return bound_job_->RestartTunnelWithProxyAuth(credentials);
203 } 202 }
204 203
205 LoadState HttpStreamFactoryImpl::Request::GetLoadState() const { 204 LoadState HttpStreamFactoryImpl::Request::GetLoadState() const {
206 if (bound_job_.get()) 205 if (bound_job_.get())
207 return bound_job_->GetLoadState(); 206 return bound_job_->GetLoadState();
208 DCHECK(!jobs_.empty()); 207 DCHECK(!jobs_.empty());
209 208
210 // Just pick the first one. 209 // Just pick the first one.
211 return (*jobs_.begin())->GetLoadState(); 210 return (*jobs_.begin())->GetLoadState();
212 } 211 }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 RemoveRequestFromHttpPipeliningRequestMap(); 308 RemoveRequestFromHttpPipeliningRequestMap();
310 309
311 std::set<Job*> tmp; 310 std::set<Job*> tmp;
312 tmp.swap(jobs_); 311 tmp.swap(jobs_);
313 312
314 for (std::set<Job*>::iterator it = tmp.begin(); it != tmp.end(); ++it) 313 for (std::set<Job*>::iterator it = tmp.begin(); it != tmp.end(); ++it)
315 factory_->OrphanJob(*it, this); 314 factory_->OrphanJob(*it, this);
316 } 315 }
317 316
318 } // namespace net 317 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698