Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: net/test/spawner_communicator.h

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initialize to NULL Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/spdy/spdy_test_util_spdy3.h ('k') | net/test/spawner_communicator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/spdy/spdy_test_util_spdy3.h ('k') | net/test/spawner_communicator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698