| 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/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 } | 492 } |
| 493 | 493 |
| 494 const HttpRequestInfo& CreateUnreadableFilePostRequest() { | 494 const HttpRequestInfo& CreateUnreadableFilePostRequest() { |
| 495 if (google_post_request_initialized_) | 495 if (google_post_request_initialized_) |
| 496 return google_post_request_; | 496 return google_post_request_; |
| 497 | 497 |
| 498 base::FilePath file_path; | 498 base::FilePath file_path; |
| 499 CHECK(base::CreateTemporaryFileInDir(temp_dir_.path(), &file_path)); | 499 CHECK(base::CreateTemporaryFileInDir(temp_dir_.path(), &file_path)); |
| 500 CHECK_EQ(static_cast<int>(kUploadDataSize), | 500 CHECK_EQ(static_cast<int>(kUploadDataSize), |
| 501 base::WriteFile(file_path, kUploadData, kUploadDataSize)); | 501 base::WriteFile(file_path, kUploadData, kUploadDataSize)); |
| 502 CHECK(file_util::MakeFileUnreadable(file_path)); | 502 CHECK(base::MakeFileUnreadable(file_path)); |
| 503 | 503 |
| 504 ScopedVector<UploadElementReader> element_readers; | 504 ScopedVector<UploadElementReader> element_readers; |
| 505 element_readers.push_back( | 505 element_readers.push_back( |
| 506 new UploadFileElementReader(base::MessageLoopProxy::current().get(), | 506 new UploadFileElementReader(base::MessageLoopProxy::current().get(), |
| 507 file_path, | 507 file_path, |
| 508 0, | 508 0, |
| 509 kUploadDataSize, | 509 kUploadDataSize, |
| 510 base::Time())); | 510 base::Time())); |
| 511 upload_data_stream_.reset( | 511 upload_data_stream_.reset( |
| 512 new UploadDataStream(element_readers.Pass(), 0)); | 512 new UploadDataStream(element_readers.Pass(), 0)); |
| (...skipping 6035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6548 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { | 6548 TEST_P(SpdyNetworkTransactionTLSUsageCheckTest, TLSCipherSuiteSucky) { |
| 6549 scoped_ptr<SSLSocketDataProvider> ssl_provider( | 6549 scoped_ptr<SSLSocketDataProvider> ssl_provider( |
| 6550 new SSLSocketDataProvider(ASYNC, OK)); | 6550 new SSLSocketDataProvider(ASYNC, OK)); |
| 6551 // Set to TLS_RSA_WITH_NULL_MD5 | 6551 // Set to TLS_RSA_WITH_NULL_MD5 |
| 6552 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); | 6552 SSLConnectionStatusSetCipherSuite(0x1, &ssl_provider->connection_status); |
| 6553 | 6553 |
| 6554 RunTLSUsageCheckTest(ssl_provider.Pass()); | 6554 RunTLSUsageCheckTest(ssl_provider.Pass()); |
| 6555 } | 6555 } |
| 6556 | 6556 |
| 6557 } // namespace net | 6557 } // namespace net |
| OLD | NEW |