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 // This class represents contextual information (cookies, cache, etc.) | 5 // This class represents contextual information (cookies, cache, etc.) |
6 // that's useful when processing resource requests. | 6 // that's useful when processing resource requests. |
7 // The class is reference-counted so that it can be cleaned up after any | 7 // The class is reference-counted so that it can be cleaned up after any |
8 // requests that are using it have been completed. | 8 // requests that are using it have been completed. |
9 | 9 |
10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 10 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
192 void set_sdch_manager(SdchManager* sdch_manager) { | 192 void set_sdch_manager(SdchManager* sdch_manager) { |
193 sdch_manager_ = sdch_manager; | 193 sdch_manager_ = sdch_manager; |
194 } | 194 } |
195 | 195 |
196 // Gets the URLRequest objects that hold a reference to this | 196 // Gets the URLRequest objects that hold a reference to this |
197 // URLRequestContext. | 197 // URLRequestContext. |
198 std::set<const URLRequest*>* url_requests() const { | 198 std::set<const URLRequest*>* url_requests() const { |
199 return url_requests_.get(); | 199 return url_requests_.get(); |
200 } | 200 } |
201 | 201 |
202 // CHECKs that no URLRequests using this context remain. Subclasses should | |
203 // additionally call AssertNoURLRequests() within their own destructor, | |
204 // prior to implicit destruction of subclass-owned state. | |
sky
2014/07/10 19:37:32
How come the call to this in the destructor isn't
Ryan Sleevi
2014/07/10 19:39:36
The issue is running into crashes in the derived-c
| |
202 void AssertNoURLRequests() const; | 205 void AssertNoURLRequests() const; |
203 | 206 |
204 // Get the underlying |HttpUserAgentSettings| implementation that provides | 207 // Get the underlying |HttpUserAgentSettings| implementation that provides |
205 // the HTTP Accept-Language and User-Agent header values. | 208 // the HTTP Accept-Language and User-Agent header values. |
206 const HttpUserAgentSettings* http_user_agent_settings() const { | 209 const HttpUserAgentSettings* http_user_agent_settings() const { |
207 return http_user_agent_settings_; | 210 return http_user_agent_settings_; |
208 } | 211 } |
209 void set_http_user_agent_settings( | 212 void set_http_user_agent_settings( |
210 HttpUserAgentSettings* http_user_agent_settings) { | 213 HttpUserAgentSettings* http_user_agent_settings) { |
211 http_user_agent_settings_ = http_user_agent_settings; | 214 http_user_agent_settings_ = http_user_agent_settings; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 // --------------------------------------------------------------------------- | 247 // --------------------------------------------------------------------------- |
245 | 248 |
246 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 249 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
247 | 250 |
248 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 251 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
249 }; | 252 }; |
250 | 253 |
251 } // namespace net | 254 } // namespace net |
252 | 255 |
253 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 256 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |