| 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 is useful for building a simple URLRequestContext. Most creators | 5 // This class is useful for building a simple URLRequestContext. Most creators |
| 6 // of new URLRequestContexts should use this helper class to construct it. Call | 6 // of new URLRequestContexts should use this helper class to construct it. Call |
| 7 // any configuration params, and when done, invoke Build() to construct the | 7 // any configuration params, and when done, invoke Build() to construct the |
| 8 // URLRequestContext. This URLRequestContext will own all its own storage. | 8 // URLRequestContext. This URLRequestContext will own all its own storage. |
| 9 // | 9 // |
| 10 // URLRequestContextBuilder and its associated params classes are initially | 10 // URLRequestContextBuilder and its associated params classes are initially |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 void SetSpdyAndQuicEnabled(bool spdy_enabled, | 161 void SetSpdyAndQuicEnabled(bool spdy_enabled, |
| 162 bool quic_enabled); | 162 bool quic_enabled); |
| 163 | 163 |
| 164 void set_throttling_enabled(bool throttling_enabled) { | 164 void set_throttling_enabled(bool throttling_enabled) { |
| 165 throttling_enabled_ = throttling_enabled; | 165 throttling_enabled_ = throttling_enabled; |
| 166 } | 166 } |
| 167 | 167 |
| 168 URLRequestContext* Build(); | 168 URLRequestContext* Build(); |
| 169 | 169 |
| 170 private: | 170 private: |
| 171 struct SchemeFactory { | 171 struct NET_EXPORT SchemeFactory { |
| 172 SchemeFactory(const std::string& scheme, | 172 SchemeFactory(const std::string& scheme, |
| 173 net::HttpAuthHandlerFactory* factory); | 173 net::HttpAuthHandlerFactory* factory); |
| 174 ~SchemeFactory(); | 174 ~SchemeFactory(); |
| 175 | 175 |
| 176 std::string scheme; | 176 std::string scheme; |
| 177 net::HttpAuthHandlerFactory* factory; | 177 net::HttpAuthHandlerFactory* factory; |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 std::string accept_language_; | 180 std::string accept_language_; |
| 181 std::string user_agent_; | 181 std::string user_agent_; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 202 scoped_ptr<NetworkDelegate> network_delegate_; | 202 scoped_ptr<NetworkDelegate> network_delegate_; |
| 203 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 203 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
| 204 std::vector<SchemeFactory> extra_http_auth_handlers_; | 204 std::vector<SchemeFactory> extra_http_auth_handlers_; |
| 205 | 205 |
| 206 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 206 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 207 }; | 207 }; |
| 208 | 208 |
| 209 } // namespace net | 209 } // namespace net |
| 210 | 210 |
| 211 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 211 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |