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

Side by Side Diff: net/url_request/url_request_http_job.cc

Issue 1304143010: Plumbing SSLPrivateKey Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing unused function in Android. Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/url_request/url_request_http_job.h" 5 #include "net/url_request/url_request_http_job.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 // OnAuthRequired. 1239 // OnAuthRequired.
1240 // 1240 //
1241 // We have to do this via InvokeLater to avoid "recursing" the consumer. 1241 // We have to do this via InvokeLater to avoid "recursing" the consumer.
1242 // 1242 //
1243 base::ThreadTaskRunnerHandle::Get()->PostTask( 1243 base::ThreadTaskRunnerHandle::Get()->PostTask(
1244 FROM_HERE, base::Bind(&URLRequestHttpJob::OnStartCompleted, 1244 FROM_HERE, base::Bind(&URLRequestHttpJob::OnStartCompleted,
1245 weak_factory_.GetWeakPtr(), OK)); 1245 weak_factory_.GetWeakPtr(), OK));
1246 } 1246 }
1247 1247
1248 void URLRequestHttpJob::ContinueWithCertificate( 1248 void URLRequestHttpJob::ContinueWithCertificate(
1249 X509Certificate* client_cert) { 1249 X509Certificate* client_cert,
1250 SSLPrivateKey* client_private_key) {
1250 DCHECK(transaction_.get()); 1251 DCHECK(transaction_.get());
1251 1252
1252 DCHECK(!response_info_) << "should not have a response yet"; 1253 DCHECK(!response_info_) << "should not have a response yet";
1253 receive_headers_end_ = base::TimeTicks(); 1254 receive_headers_end_ = base::TimeTicks();
1254 1255
1255 ResetTimer(); 1256 ResetTimer();
1256 1257
1257 // No matter what, we want to report our status as IO pending since we will 1258 // No matter what, we want to report our status as IO pending since we will
1258 // be notifying our consumer asynchronously via OnStartCompleted. 1259 // be notifying our consumer asynchronously via OnStartCompleted.
1259 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); 1260 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
1260 1261
1261 int rv = transaction_->RestartWithCertificate(client_cert, start_callback_); 1262 int rv = transaction_->RestartWithCertificate(client_cert, client_private_key,
1263 start_callback_);
1262 if (rv == ERR_IO_PENDING) 1264 if (rv == ERR_IO_PENDING)
1263 return; 1265 return;
1264 1266
1265 // The transaction started synchronously, but we need to notify the 1267 // The transaction started synchronously, but we need to notify the
1266 // URLRequest delegate via the message loop. 1268 // URLRequest delegate via the message loop.
1267 base::ThreadTaskRunnerHandle::Get()->PostTask( 1269 base::ThreadTaskRunnerHandle::Get()->PostTask(
1268 FROM_HERE, base::Bind(&URLRequestHttpJob::OnStartCompleted, 1270 FROM_HERE, base::Bind(&URLRequestHttpJob::OnStartCompleted,
1269 weak_factory_.GetWeakPtr(), rv)); 1271 weak_factory_.GetWeakPtr(), rv));
1270 } 1272 }
1271 1273
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1567 return override_response_headers_.get() ? 1569 return override_response_headers_.get() ?
1568 override_response_headers_.get() : 1570 override_response_headers_.get() :
1569 transaction_->GetResponseInfo()->headers.get(); 1571 transaction_->GetResponseInfo()->headers.get();
1570 } 1572 }
1571 1573
1572 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1574 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1573 awaiting_callback_ = false; 1575 awaiting_callback_ = false;
1574 } 1576 }
1575 1577
1576 } // namespace net 1578 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698