Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: components/cronet/url_request_context_config.h

Issue 2970423002: Remove a bunch of URLRequestContext::Builder setters. (Closed)
Patch Set: Oops Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #ifndef COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 5 #ifndef COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
6 #define COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 6 #define COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/optional.h" 14 #include "base/optional.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "base/values.h" 16 #include "base/values.h"
17 #include "net/base/hash_value.h" 17 #include "net/base/hash_value.h"
18 #include "net/cert/cert_verifier.h" 18 #include "net/cert/cert_verifier.h"
19 #include "net/http/http_network_session.h"
19 #include "net/nqe/effective_connection_type.h" 20 #include "net/nqe/effective_connection_type.h"
20 21
21 namespace base { 22 namespace base {
22 class SequencedTaskRunner; 23 class SequencedTaskRunner;
23 } // namespace base 24 } // namespace base
24 25
25 namespace net { 26 namespace net {
26 class CertVerifier; 27 class CertVerifier;
27 class NetLog; 28 class NetLog;
28 class URLRequestContextBuilder; 29 class URLRequestContextBuilder;
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 // If set, forces NQE to return the set value as the effective connection 180 // If set, forces NQE to return the set value as the effective connection
180 // type. 181 // type.
181 base::Optional<net::EffectiveConnectionType> 182 base::Optional<net::EffectiveConnectionType>
182 nqe_forced_effective_connection_type; 183 nqe_forced_effective_connection_type;
183 184
184 private: 185 private:
185 // Parses experimental options and makes appropriate changes to settings in 186 // Parses experimental options and makes appropriate changes to settings in
186 // the URLRequestContextConfig and URLRequestContextBuilder. 187 // the URLRequestContextConfig and URLRequestContextBuilder.
187 void ParseAndSetExperimentalOptions( 188 void ParseAndSetExperimentalOptions(
188 net::URLRequestContextBuilder* context_builder, 189 net::URLRequestContextBuilder* context_builder,
190 net::HttpNetworkSession::Params* session_params,
189 net::NetLog* net_log, 191 net::NetLog* net_log,
190 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner); 192 const scoped_refptr<base::SequencedTaskRunner>& file_task_runner);
191 193
192 // Experimental options encoded as a string in a JSON format containing 194 // Experimental options encoded as a string in a JSON format containing
193 // experiments and their corresponding configuration options. The format 195 // experiments and their corresponding configuration options. The format
194 // is a JSON object with the name of the experiment as the key, and the 196 // is a JSON object with the name of the experiment as the key, and the
195 // configuration options as the value. An example: 197 // configuration options as the value. An example:
196 // {"experiment1": {"option1": "option_value1", "option2": "option_value2", 198 // {"experiment1": {"option1": "option_value1", "option2":
199 // "option_value2",
197 // ...}, "experiment2: {"option3", "option_value3", ...}, ...} 200 // ...}, "experiment2: {"option3", "option_value3", ...}, ...}
198 const std::string experimental_options; 201 const std::string experimental_options;
199 202
200 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig); 203 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfig);
201 }; 204 };
202 205
203 // Stores intermediate state for URLRequestContextConfig. Initializes with 206 // Stores intermediate state for URLRequestContextConfig. Initializes with
204 // (mostly) sane defaults, then the appropriate member variables can be 207 // (mostly) sane defaults, then the appropriate member variables can be
205 // modified, and it can be finalized with Build(). 208 // modified, and it can be finalized with Build().
206 struct URLRequestContextConfigBuilder { 209 struct URLRequestContextConfigBuilder {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 // Data to populate CertVerifierCache. 257 // Data to populate CertVerifierCache.
255 std::string cert_verifier_data = ""; 258 std::string cert_verifier_data = "";
256 259
257 private: 260 private:
258 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfigBuilder); 261 DISALLOW_COPY_AND_ASSIGN(URLRequestContextConfigBuilder);
259 }; 262 };
260 263
261 } // namespace cronet 264 } // namespace cronet
262 265
263 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_ 266 #endif // COMPONENTS_CRONET_URL_REQUEST_CONTEXT_CONFIG_H_
OLDNEW
« no previous file with comments | « no previous file | components/cronet/url_request_context_config.cc » ('j') | components/cronet/url_request_context_config.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698