| 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 #ifndef NET_TEST_SPAWNER_COMMUNICATOR_H_ | 5 #ifndef NET_TEST_SPAWNER_COMMUNICATOR_H_ |
| 6 #define NET_TEST_SPAWNER_COMMUNICATOR_H_ | 6 #define NET_TEST_SPAWNER_COMMUNICATOR_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // Helper to add |port_| to the list of the globally explicitly allowed ports. | 128 // Helper to add |port_| to the list of the globally explicitly allowed ports. |
| 129 scoped_ptr<ScopedPortException> allowed_port_; | 129 scoped_ptr<ScopedPortException> allowed_port_; |
| 130 | 130 |
| 131 // The next ID to use for |cur_request_| (monotonically increasing). | 131 // The next ID to use for |cur_request_| (monotonically increasing). |
| 132 int next_id_; | 132 int next_id_; |
| 133 | 133 |
| 134 // Factory for creating the time-out task. This takes care of revoking | 134 // Factory for creating the time-out task. This takes care of revoking |
| 135 // outstanding tasks when |this| is deleted. | 135 // outstanding tasks when |this| is deleted. |
| 136 base::WeakPtrFactory<SpawnerCommunicator> weak_factory_; | 136 base::WeakPtrFactory<SpawnerCommunicator> weak_factory_; |
| 137 | 137 |
| 138 scoped_ptr<URLRequestContext> context_; |
| 139 |
| 138 // The current (in progress) request, or NULL. | 140 // The current (in progress) request, or NULL. |
| 139 scoped_ptr<URLRequest> cur_request_; | 141 scoped_ptr<URLRequest> cur_request_; |
| 140 | 142 |
| 141 // Only gets/sets |is_running_| on user's thread to avoid race-condition. | 143 // Only gets/sets |is_running_| on user's thread to avoid race-condition. |
| 142 bool is_running_; | 144 bool is_running_; |
| 143 | 145 |
| 144 DISALLOW_COPY_AND_ASSIGN(SpawnerCommunicator); | 146 DISALLOW_COPY_AND_ASSIGN(SpawnerCommunicator); |
| 145 }; | 147 }; |
| 146 | 148 |
| 147 } // namespace net | 149 } // namespace net |
| 148 | 150 |
| 149 #endif // NET_TEST_SPAWNER_COMMUNICATOR_H_ | 151 #endif // NET_TEST_SPAWNER_COMMUNICATOR_H_ |
| 150 | |
| OLD | NEW |