| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "net/base/test_completion_callback.h" | 10 #include "net/base/test_completion_callback.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 class TestTransactionFactory : public HttpTransactionFactory { | 46 class TestTransactionFactory : public HttpTransactionFactory { |
| 47 public: | 47 public: |
| 48 TestTransactionFactory(const HttpNetworkSession::Params& params) | 48 TestTransactionFactory(const HttpNetworkSession::Params& params) |
| 49 : session_(new HttpNetworkSession(params)) {} | 49 : session_(new HttpNetworkSession(params)) {} |
| 50 | 50 |
| 51 virtual ~TestTransactionFactory() { | 51 virtual ~TestTransactionFactory() { |
| 52 } | 52 } |
| 53 | 53 |
| 54 // HttpTransactionFactory methods | 54 // HttpTransactionFactory methods |
| 55 virtual int CreateTransaction(RequestPriority priority, | 55 virtual int CreateTransaction(RequestPriority priority, |
| 56 scoped_ptr<HttpTransaction>* trans) OVERRIDE { | 56 scoped_ptr<HttpTransaction>* trans) override { |
| 57 trans->reset(new HttpNetworkTransaction(priority, session_.get())); | 57 trans->reset(new HttpNetworkTransaction(priority, session_.get())); |
| 58 return OK; | 58 return OK; |
| 59 } | 59 } |
| 60 | 60 |
| 61 virtual HttpCache* GetCache() OVERRIDE { | 61 virtual HttpCache* GetCache() override { |
| 62 return nullptr; | 62 return nullptr; |
| 63 } | 63 } |
| 64 | 64 |
| 65 virtual HttpNetworkSession* GetSession() OVERRIDE { return session_.get(); }; | 65 virtual HttpNetworkSession* GetSession() override { return session_.get(); }; |
| 66 | 66 |
| 67 private: | 67 private: |
| 68 scoped_refptr<HttpNetworkSession> session_; | 68 scoped_refptr<HttpNetworkSession> session_; |
| 69 }; | 69 }; |
| 70 | 70 |
| 71 } // namespace | 71 } // namespace |
| 72 | 72 |
| 73 class QuicEndToEndTest : public PlatformTest { | 73 class QuicEndToEndTest : public PlatformTest { |
| 74 protected: | 74 protected: |
| 75 QuicEndToEndTest() | 75 QuicEndToEndTest() |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 base::MessageLoop::current()->Run(); | 304 base::MessageLoop::current()->Run(); |
| 305 | 305 |
| 306 for (size_t i = 0; i < num_requests; ++i) { | 306 for (size_t i = 0; i < num_requests; ++i) { |
| 307 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); | 307 CheckResponse(*consumers[i], "HTTP/1.1 200 OK", kResponseBody); |
| 308 } | 308 } |
| 309 STLDeleteElements(&consumers); | 309 STLDeleteElements(&consumers); |
| 310 } | 310 } |
| 311 | 311 |
| 312 } // namespace test | 312 } // namespace test |
| 313 } // namespace net | 313 } // namespace net |
| OLD | NEW |