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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 transport_security_state_ = state; | 160 transport_security_state_ = state; |
161 } | 161 } |
162 | 162 |
163 CTVerifier* cert_transparency_verifier() const { | 163 CTVerifier* cert_transparency_verifier() const { |
164 return cert_transparency_verifier_; | 164 return cert_transparency_verifier_; |
165 } | 165 } |
166 void set_cert_transparency_verifier(CTVerifier* verifier) { | 166 void set_cert_transparency_verifier(CTVerifier* verifier) { |
167 cert_transparency_verifier_ = verifier; | 167 cert_transparency_verifier_ = verifier; |
168 } | 168 } |
169 | 169 |
170 // --------------------------------------------------------------------------- | |
171 // Legacy accessors that delegate to http_user_agent_settings_. | |
172 // TODO(pauljensen): Remove after all clients are updated to directly access | |
173 // http_user_agent_settings_. | |
174 // Gets the value of 'Accept-Language' header field. | |
175 std::string GetAcceptLanguage() const; | |
176 // Gets the UA string to use for the given URL. Pass an invalid URL (such as | |
177 // GURL()) to get the default UA string. | |
178 std::string GetUserAgent(const GURL& url) const; | |
179 // --------------------------------------------------------------------------- | |
180 | |
181 const URLRequestJobFactory* job_factory() const { return job_factory_; } | 170 const URLRequestJobFactory* job_factory() const { return job_factory_; } |
182 void set_job_factory(const URLRequestJobFactory* job_factory) { | 171 void set_job_factory(const URLRequestJobFactory* job_factory) { |
183 job_factory_ = job_factory; | 172 job_factory_ = job_factory; |
184 } | 173 } |
185 | 174 |
186 // May be NULL. | 175 // May be NULL. |
187 URLRequestThrottlerManager* throttler_manager() const { | 176 URLRequestThrottlerManager* throttler_manager() const { |
188 return throttler_manager_; | 177 return throttler_manager_; |
189 } | 178 } |
190 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager) { | 179 void set_throttler_manager(URLRequestThrottlerManager* throttler_manager) { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 // --------------------------------------------------------------------------- | 230 // --------------------------------------------------------------------------- |
242 | 231 |
243 scoped_ptr<std::set<const URLRequest*> > url_requests_; | 232 scoped_ptr<std::set<const URLRequest*> > url_requests_; |
244 | 233 |
245 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 234 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
246 }; | 235 }; |
247 | 236 |
248 } // namespace net | 237 } // namespace net |
249 | 238 |
250 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 239 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
OLD | NEW |