| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 // Override default net::HttpNetworkSession::Params settings. | 139 // Override default net::HttpNetworkSession::Params settings. |
| 140 void set_http_network_session_params( | 140 void set_http_network_session_params( |
| 141 const HttpNetworkSessionParams& http_network_session_params) { | 141 const HttpNetworkSessionParams& http_network_session_params) { |
| 142 http_network_session_params_ = http_network_session_params; | 142 http_network_session_params_ = http_network_session_params; |
| 143 } | 143 } |
| 144 | 144 |
| 145 URLRequestContext* Build(); | 145 URLRequestContext* Build(); |
| 146 | 146 |
| 147 private: | 147 private: |
| 148 | |
| 149 struct SchemeFactory { | 148 struct SchemeFactory { |
| 150 SchemeFactory(const std::string& scheme, | 149 SchemeFactory(const std::string& scheme, |
| 151 net::HttpAuthHandlerFactory* factory); | 150 net::HttpAuthHandlerFactory* factory); |
| 152 ~SchemeFactory(); | 151 ~SchemeFactory(); |
| 153 | 152 |
| 154 std::string scheme; | 153 std::string scheme; |
| 155 net::HttpAuthHandlerFactory* factory; | 154 net::HttpAuthHandlerFactory* factory; |
| 156 }; | 155 }; |
| 157 | 156 |
| 158 std::string accept_language_; | 157 std::string accept_language_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 175 scoped_ptr<NetworkDelegate> network_delegate_; | 174 scoped_ptr<NetworkDelegate> network_delegate_; |
| 176 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; | 175 scoped_ptr<FtpTransactionFactory> ftp_transaction_factory_; |
| 177 std::vector<SchemeFactory> extra_http_auth_handlers_; | 176 std::vector<SchemeFactory> extra_http_auth_handlers_; |
| 178 | 177 |
| 179 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); | 178 DISALLOW_COPY_AND_ASSIGN(URLRequestContextBuilder); |
| 180 }; | 179 }; |
| 181 | 180 |
| 182 } // namespace net | 181 } // namespace net |
| 183 | 182 |
| 184 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ | 183 #endif // NET_URL_REQUEST_URL_REQUEST_CONTEXT_BUILDER_H_ |
| OLD | NEW |