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

Unified Diff: net/url_request/url_request_context_builder.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_context_builder.cc
diff --git a/net/url_request/url_request_context_builder.cc b/net/url_request/url_request_context_builder.cc
index c0d0bb5b1e88b7eb636ecc7dd9f1de6da1d4c650..8015a362471bbf1ef4a1904840f46e2c3659ef0f 100644
--- a/net/url_request/url_request_context_builder.cc
+++ b/net/url_request/url_request_context_builder.cc
@@ -123,12 +123,9 @@ class BasicNetworkDelegate : public NetworkDelegate {
class BasicURLRequestContext : public URLRequestContext {
public:
- BasicURLRequestContext()
- : storage_(this) {}
+ BasicURLRequestContext() : storage_(this) {}
- URLRequestContextStorage* storage() {
- return &storage_;
- }
+ URLRequestContextStorage* storage() { return &storage_; }
base::Thread* GetCacheThread() {
if (!cache_thread_) {
@@ -161,9 +158,10 @@ class BasicURLRequestContext : public URLRequestContext {
} // namespace
URLRequestContextBuilder::HttpCacheParams::HttpCacheParams()
- : type(IN_MEMORY),
- max_size(0) {}
-URLRequestContextBuilder::HttpCacheParams::~HttpCacheParams() {}
+ : type(IN_MEMORY), max_size(0) {
+}
+URLRequestContextBuilder::HttpCacheParams::~HttpCacheParams() {
+}
URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams()
: ignore_certificate_errors(false),
@@ -171,10 +169,12 @@ URLRequestContextBuilder::HttpNetworkSessionParams::HttpNetworkSessionParams()
http_pipelining_enabled(false),
testing_fixed_http_port(0),
testing_fixed_https_port(0),
- trusted_spdy_proxy() {}
+ trusted_spdy_proxy() {
+}
-URLRequestContextBuilder::HttpNetworkSessionParams::~HttpNetworkSessionParams()
-{}
+URLRequestContextBuilder::HttpNetworkSessionParams::
+ ~HttpNetworkSessionParams() {
+}
URLRequestContextBuilder::SchemeFactory::SchemeFactory(
const std::string& auth_scheme,
@@ -194,7 +194,8 @@ URLRequestContextBuilder::URLRequestContextBuilder()
http_cache_enabled_(true) {
}
-URLRequestContextBuilder::~URLRequestContextBuilder() {}
+URLRequestContextBuilder::~URLRequestContextBuilder() {
+}
void URLRequestContextBuilder::set_proxy_config_service(
ProxyConfigService* proxy_config_service) {
@@ -205,8 +206,8 @@ URLRequestContext* URLRequestContextBuilder::Build() {
BasicURLRequestContext* context = new BasicURLRequestContext;
URLRequestContextStorage* storage = context->storage();
- storage->set_http_user_agent_settings(new StaticHttpUserAgentSettings(
- accept_language_, user_agent_));
+ storage->set_http_user_agent_settings(
+ new StaticHttpUserAgentSettings(accept_language_, user_agent_));
if (!network_delegate_)
network_delegate_.reset(new BasicNetworkDelegate);
@@ -219,8 +220,8 @@ URLRequestContext* URLRequestContextBuilder::Build() {
storage->set_net_log(new net::NetLog);
- // TODO(willchan): Switch to using this code when
- // ProxyService::CreateSystemProxyConfigService()'s signature doesn't suck.
+// TODO(willchan): Switch to using this code when
+// ProxyService::CreateSystemProxyConfigService()'s signature doesn't suck.
#if defined(OS_LINUX) || defined(OS_ANDROID)
ProxyConfigService* proxy_config_service = proxy_config_service_.release();
#else
@@ -228,21 +229,19 @@ URLRequestContext* URLRequestContextBuilder::Build() {
if (proxy_config_service_) {
proxy_config_service = proxy_config_service_.release();
} else {
- proxy_config_service =
- ProxyService::CreateSystemProxyConfigService(
- base::ThreadTaskRunnerHandle::Get().get(),
- context->GetFileThread()->message_loop());
+ proxy_config_service = ProxyService::CreateSystemProxyConfigService(
+ base::ThreadTaskRunnerHandle::Get().get(),
+ context->GetFileThread()->message_loop());
}
#endif // defined(OS_LINUX) || defined(OS_ANDROID)
- storage->set_proxy_service(
- ProxyService::CreateUsingSystemProxyResolver(
- proxy_config_service,
- 4, // TODO(willchan): Find a better constant somewhere.
- context->net_log()));
+ storage->set_proxy_service(ProxyService::CreateUsingSystemProxyResolver(
+ proxy_config_service,
+ 4, // TODO(willchan): Find a better constant somewhere.
+ context->net_log()));
storage->set_ssl_config_service(new net::SSLConfigServiceDefaults);
HttpAuthHandlerRegistryFactory* http_auth_handler_registry_factory =
net::HttpAuthHandlerRegistryFactory::CreateDefault(
- context->host_resolver());
+ context->host_resolver());
for (size_t i = 0; i < extra_http_auth_handlers_.size(); ++i) {
http_auth_handler_registry_factory->RegisterSchemeFactory(
extra_http_auth_handlers_[i].scheme,
@@ -251,9 +250,8 @@ URLRequestContext* URLRequestContextBuilder::Build() {
storage->set_http_auth_handler_factory(http_auth_handler_registry_factory);
storage->set_cookie_store(new CookieMonster(NULL, NULL));
storage->set_transport_security_state(new net::TransportSecurityState());
- storage->set_http_server_properties(
- scoped_ptr<net::HttpServerProperties>(
- new net::HttpServerPropertiesImpl()));
+ storage->set_http_server_properties(scoped_ptr<net::HttpServerProperties>(
+ new net::HttpServerPropertiesImpl()));
storage->set_cert_verifier(CertVerifier::CreateDefault());
net::HttpNetworkSession::Params network_session_params;
@@ -262,8 +260,7 @@ URLRequestContext* URLRequestContextBuilder::Build() {
network_session_params.transport_security_state =
context->transport_security_state();
network_session_params.proxy_service = context->proxy_service();
- network_session_params.ssl_config_service =
- context->ssl_config_service();
+ network_session_params.ssl_config_service = context->ssl_config_service();
network_session_params.http_auth_handler_factory =
context->http_auth_handler_factory();
network_session_params.network_delegate = network_delegate;
@@ -300,8 +297,8 @@ URLRequestContext* URLRequestContextBuilder::Build() {
HttpCache::DefaultBackend::InMemory(http_cache_params_.max_size);
}
- http_transaction_factory = new HttpCache(
- network_session_params, http_cache_backend);
+ http_transaction_factory =
+ new HttpCache(network_session_params, http_cache_backend);
} else {
scoped_refptr<net::HttpNetworkSession> network_session(
new net::HttpNetworkSession(network_session_params));
@@ -315,15 +312,16 @@ URLRequestContext* URLRequestContextBuilder::Build() {
job_factory->SetProtocolHandler("data", new DataProtocolHandler);
if (file_enabled_) {
job_factory->SetProtocolHandler(
- "file",
- new FileProtocolHandler(context->GetFileThread()->message_loop_proxy()));
+ "file",
+ new FileProtocolHandler(
+ context->GetFileThread()->message_loop_proxy()));
}
#if !defined(DISABLE_FTP_SUPPORT)
if (ftp_enabled_) {
ftp_transaction_factory_.reset(
new FtpNetworkLayer(context->host_resolver()));
- job_factory->SetProtocolHandler("ftp",
- new FtpProtocolHandler(ftp_transaction_factory_.get()));
+ job_factory->SetProtocolHandler(
+ "ftp", new FtpProtocolHandler(ftp_transaction_factory_.get()));
}
#endif
storage->set_job_factory(job_factory);

Powered by Google App Engine
This is Rietveld 408576698