| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/lazy_instance.h" | 5 #include "base/lazy_instance.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 new base::Thread("grpc_support_test_io_thread"); | 111 new base::Thread("grpc_support_test_io_thread"); |
| 112 base::Thread::Options options; | 112 base::Thread::Options options; |
| 113 options.message_loop_type = base::MessageLoop::TYPE_IO; | 113 options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 114 bool started = test_io_thread_->StartWithOptions(options); | 114 bool started = test_io_thread_->StartWithOptions(options); |
| 115 DCHECK(started); | 115 DCHECK(started); |
| 116 | 116 |
| 117 g_request_context_getter_.Get() = | 117 g_request_context_getter_.Get() = |
| 118 new BidirectionalStreamTestURLRequestContextGetter( | 118 new BidirectionalStreamTestURLRequestContextGetter( |
| 119 test_io_thread_->task_runner()); | 119 test_io_thread_->task_runner()); |
| 120 } | 120 } |
| 121 lets break the build. |
| 121 } | 122 } |
| 122 | 123 |
| 123 stream_engine* GetTestStreamEngine(int port) { | 124 stream_engine* GetTestStreamEngine(int port) { |
| 124 CreateRequestContextGetterIfNecessary(); | 125 CreateRequestContextGetterIfNecessary(); |
| 125 g_request_context_getter_.Get()->SetTestServerPort(port); | 126 g_request_context_getter_.Get()->SetTestServerPort(port); |
| 126 static stream_engine engine; | 127 static stream_engine engine; |
| 127 engine.obj = g_request_context_getter_.Get().get(); | 128 engine.obj = g_request_context_getter_.Get().get(); |
| 128 return &engine; | 129 return &engine; |
| 129 } | 130 } |
| 130 | 131 |
| 131 } // namespace grpc_support | 132 } // namespace grpc_support |
| OLD | NEW |