OLD | NEW |
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 <string> | 5 #include <string> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
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/files/file_util.h" | 10 #include "base/files/file_util.h" |
(...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 // The KillerCallback will delete the transaction on error as part of the | 1538 // The KillerCallback will delete the transaction on error as part of the |
1539 // callback. | 1539 // callback. |
1540 class KillerCallback : public TestCompletionCallbackBase { | 1540 class KillerCallback : public TestCompletionCallbackBase { |
1541 public: | 1541 public: |
1542 explicit KillerCallback(HttpNetworkTransaction* transaction) | 1542 explicit KillerCallback(HttpNetworkTransaction* transaction) |
1543 : transaction_(transaction), | 1543 : transaction_(transaction), |
1544 callback_(base::Bind(&KillerCallback::OnComplete, | 1544 callback_(base::Bind(&KillerCallback::OnComplete, |
1545 base::Unretained(this))) { | 1545 base::Unretained(this))) { |
1546 } | 1546 } |
1547 | 1547 |
1548 virtual ~KillerCallback() {} | 1548 ~KillerCallback() override {} |
1549 | 1549 |
1550 const CompletionCallback& callback() const { return callback_; } | 1550 const CompletionCallback& callback() const { return callback_; } |
1551 | 1551 |
1552 private: | 1552 private: |
1553 void OnComplete(int result) { | 1553 void OnComplete(int result) { |
1554 if (result < 0) | 1554 if (result < 0) |
1555 delete transaction_; | 1555 delete transaction_; |
1556 | 1556 |
1557 SetResult(result); | 1557 SetResult(result); |
1558 } | 1558 } |
(...skipping 5054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6613 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6613 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
6614 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6614 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
6615 new SSLSocketDataProvider(ASYNC, OK)); | 6615 new SSLSocketDataProvider(ASYNC, OK)); |
6616 // Set to TLS_RSA_WITH_NULL_MD5 | 6616 // Set to TLS_RSA_WITH_NULL_MD5 |
6617 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6617 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
6618 | 6618 |
6619 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6619 RunTLSUsageCheckTest(ssl_provider.Pass()); |
6620 } | 6620 } |
6621 | 6621 |
6622 } // namespace net | 6622 } // namespace net |
OLD | NEW |