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

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

Issue 1422573008: Plumbing SSLPrivateKey (//net) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing extra tab. Created 5 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) 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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 // OnAuthRequired. 1261 // OnAuthRequired.
1262 // 1262 //
1263 // We have to do this via InvokeLater to avoid "recursing" the consumer. 1263 // We have to do this via InvokeLater to avoid "recursing" the consumer.
1264 // 1264 //
1265 base::ThreadTaskRunnerHandle::Get()->PostTask( 1265 base::ThreadTaskRunnerHandle::Get()->PostTask(
1266 FROM_HERE, base::Bind(&URLRequestHttpJob::OnStartCompleted, 1266 FROM_HERE, base::Bind(&URLRequestHttpJob::OnStartCompleted,
1267 weak_factory_.GetWeakPtr(), OK)); 1267 weak_factory_.GetWeakPtr(), OK));
1268 } 1268 }
1269 1269
1270 void URLRequestHttpJob::ContinueWithCertificate( 1270 void URLRequestHttpJob::ContinueWithCertificate(
1271 X509Certificate* client_cert) { 1271 X509Certificate* client_cert,
1272 SSLPrivateKey* client_private_key) {
1272 DCHECK(transaction_.get()); 1273 DCHECK(transaction_.get());
1273 1274
1274 DCHECK(!response_info_) << "should not have a response yet"; 1275 DCHECK(!response_info_) << "should not have a response yet";
1275 receive_headers_end_ = base::TimeTicks(); 1276 receive_headers_end_ = base::TimeTicks();
1276 1277
1277 ResetTimer(); 1278 ResetTimer();
1278 1279
1279 // No matter what, we want to report our status as IO pending since we will 1280 // No matter what, we want to report our status as IO pending since we will
1280 // be notifying our consumer asynchronously via OnStartCompleted. 1281 // be notifying our consumer asynchronously via OnStartCompleted.
1281 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0)); 1282 SetStatus(URLRequestStatus(URLRequestStatus::IO_PENDING, 0));
1282 1283
1283 int rv = transaction_->RestartWithCertificate(client_cert, start_callback_); 1284 int rv = transaction_->RestartWithCertificate(client_cert, client_private_key,
1285 start_callback_);
1284 if (rv == ERR_IO_PENDING) 1286 if (rv == ERR_IO_PENDING)
1285 return; 1287 return;
1286 1288
1287 // The transaction started synchronously, but we need to notify the 1289 // The transaction started synchronously, but we need to notify the
1288 // URLRequest delegate via the message loop. 1290 // URLRequest delegate via the message loop.
1289 base::ThreadTaskRunnerHandle::Get()->PostTask( 1291 base::ThreadTaskRunnerHandle::Get()->PostTask(
1290 FROM_HERE, base::Bind(&URLRequestHttpJob::OnStartCompleted, 1292 FROM_HERE, base::Bind(&URLRequestHttpJob::OnStartCompleted,
1291 weak_factory_.GetWeakPtr(), rv)); 1293 weak_factory_.GetWeakPtr(), rv));
1292 } 1294 }
1293 1295
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
1589 return override_response_headers_.get() ? 1591 return override_response_headers_.get() ?
1590 override_response_headers_.get() : 1592 override_response_headers_.get() :
1591 transaction_->GetResponseInfo()->headers.get(); 1593 transaction_->GetResponseInfo()->headers.get();
1592 } 1594 }
1593 1595
1594 void URLRequestHttpJob::NotifyURLRequestDestroyed() { 1596 void URLRequestHttpJob::NotifyURLRequestDestroyed() {
1595 awaiting_callback_ = false; 1597 awaiting_callback_ = false;
1596 } 1598 }
1597 1599
1598 } // namespace net 1600 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698