Chromium Code Reviews| 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 necessary when processing resource requests. | 6 // that's necessary when processing resource requests. |
| 7 | 7 |
| 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 8 #ifndef NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 9 #define NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| 10 | 10 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 223 } | 223 } |
| 224 void set_network_quality_estimator( | 224 void set_network_quality_estimator( |
| 225 NetworkQualityEstimator* network_quality_estimator) { | 225 NetworkQualityEstimator* network_quality_estimator) { |
| 226 network_quality_estimator_ = network_quality_estimator; | 226 network_quality_estimator_ = network_quality_estimator; |
| 227 } | 227 } |
| 228 | 228 |
| 229 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } | 229 void set_enable_brotli(bool enable_brotli) { enable_brotli_ = enable_brotli; } |
| 230 | 230 |
| 231 bool enable_brotli() const { return enable_brotli_; } | 231 bool enable_brotli() const { return enable_brotli_; } |
| 232 | 232 |
| 233 void set_check_cleartext_permitted(bool check_cleartext_permitted) { | |
|
pauljensen
2016/12/07 13:20:28
these functions need comments
mgersh
2016/12/13 17:02:58
Done.
| |
| 234 check_cleartext_permitted_ = check_cleartext_permitted; | |
| 235 } | |
| 236 | |
| 237 bool check_cleartext_permitted() const { return check_cleartext_permitted_; } | |
| 238 | |
| 233 private: | 239 private: |
| 234 // --------------------------------------------------------------------------- | 240 // --------------------------------------------------------------------------- |
| 235 // Important: When adding any new members below, consider whether they need to | 241 // Important: When adding any new members below, consider whether they need to |
| 236 // be added to CopyFrom. | 242 // be added to CopyFrom. |
| 237 // --------------------------------------------------------------------------- | 243 // --------------------------------------------------------------------------- |
| 238 | 244 |
| 239 // Ownership for these members are not defined here. Clients should either | 245 // Ownership for these members are not defined here. Clients should either |
| 240 // provide storage elsewhere or have a subclass take ownership. | 246 // provide storage elsewhere or have a subclass take ownership. |
| 241 NetLog* net_log_; | 247 NetLog* net_log_; |
| 242 HostResolver* host_resolver_; | 248 HostResolver* host_resolver_; |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 261 | 267 |
| 262 // --------------------------------------------------------------------------- | 268 // --------------------------------------------------------------------------- |
| 263 // Important: When adding any new members below, consider whether they need to | 269 // Important: When adding any new members below, consider whether they need to |
| 264 // be added to CopyFrom. | 270 // be added to CopyFrom. |
| 265 // --------------------------------------------------------------------------- | 271 // --------------------------------------------------------------------------- |
| 266 | 272 |
| 267 std::unique_ptr<std::set<const URLRequest*>> url_requests_; | 273 std::unique_ptr<std::set<const URLRequest*>> url_requests_; |
| 268 | 274 |
| 269 // Enables Brotli Content-Encoding support. | 275 // Enables Brotli Content-Encoding support. |
| 270 bool enable_brotli_; | 276 bool enable_brotli_; |
| 277 // Enables checking policy before allowing a cleartext http or ws request. | |
| 278 // Only used on Android. | |
|
pauljensen
2016/12/07 13:20:28
policy->system policy
mgersh
2016/12/13 17:02:58
Done.
| |
| 279 bool check_cleartext_permitted_; | |
| 271 | 280 |
| 272 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); | 281 DISALLOW_COPY_AND_ASSIGN(URLRequestContext); |
| 273 }; | 282 }; |
| 274 | 283 |
| 275 } // namespace net | 284 } // namespace net |
| 276 | 285 |
| 277 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ | 286 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_H_ |
| OLD | NEW |