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

Side by Side Diff: ios/crnet/crnet_environment.mm

Issue 2067843003: Require a CTVerifier and CTPolicyEnforcer for TLS/QUIC sockets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixup Created 4 years, 6 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
« no previous file with comments | « google_apis/gcm/tools/mcs_probe.cc ('k') | ios/web/shell/shell_url_request_context_getter.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ios/crnet/crnet_environment.h" 5 #include "ios/crnet/crnet_environment.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 19 matching lines...) Expand all
30 #include "ios/net/cookies/cookie_store_ios.h" 30 #include "ios/net/cookies/cookie_store_ios.h"
31 #include "ios/net/crn_http_protocol_handler.h" 31 #include "ios/net/crn_http_protocol_handler.h"
32 #include "ios/net/empty_nsurlcache.h" 32 #include "ios/net/empty_nsurlcache.h"
33 #include "ios/net/http_cache_helper.h" 33 #include "ios/net/http_cache_helper.h"
34 #include "ios/net/request_tracker.h" 34 #include "ios/net/request_tracker.h"
35 #include "ios/web/public/user_agent.h" 35 #include "ios/web/public/user_agent.h"
36 #include "net/base/net_errors.h" 36 #include "net/base/net_errors.h"
37 #include "net/base/network_change_notifier.h" 37 #include "net/base/network_change_notifier.h"
38 #include "net/base/sdch_manager.h" 38 #include "net/base/sdch_manager.h"
39 #include "net/cert/cert_verifier.h" 39 #include "net/cert/cert_verifier.h"
40 #include "net/cert/ct_policy_enforcer.h"
41 #include "net/cert/multi_log_ct_verifier.h"
40 #include "net/cookies/cookie_store.h" 42 #include "net/cookies/cookie_store.h"
41 #include "net/http/http_auth_handler_factory.h" 43 #include "net/http/http_auth_handler_factory.h"
42 #include "net/http/http_cache.h" 44 #include "net/http/http_cache.h"
43 #include "net/http/http_server_properties_impl.h" 45 #include "net/http/http_server_properties_impl.h"
44 #include "net/http/http_stream_factory.h" 46 #include "net/http/http_stream_factory.h"
45 #include "net/http/http_util.h" 47 #include "net/http/http_util.h"
46 #include "net/log/net_log.h" 48 #include "net/log/net_log.h"
47 #include "net/log/write_to_file_net_log_observer.h" 49 #include "net/log/write_to_file_net_log_observer.h"
48 #include "net/proxy/proxy_service.h" 50 #include "net/proxy/proxy_service.h"
49 #include "net/sdch/sdch_owner.h" 51 #include "net/sdch/sdch_owner.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // return this value. 380 // return this value.
379 [[NSUserDefaults standardUserDefaults] registerDefaults:@{ 381 [[NSUserDefaults standardUserDefaults] registerDefaults:@{
380 @"UserAgent" : [NSString stringWithUTF8String:user_agent.c_str()] 382 @"UserAgent" : [NSString stringWithUTF8String:user_agent.c_str()]
381 }]; 383 }];
382 main_context_->set_http_user_agent_settings( 384 main_context_->set_http_user_agent_settings(
383 new net::StaticHttpUserAgentSettings(acceptable_languages, user_agent)); 385 new net::StaticHttpUserAgentSettings(acceptable_languages, user_agent));
384 386
385 main_context_->set_ssl_config_service(new net::SSLConfigServiceDefaults); 387 main_context_->set_ssl_config_service(new net::SSLConfigServiceDefaults);
386 main_context_->set_transport_security_state( 388 main_context_->set_transport_security_state(
387 new net::TransportSecurityState()); 389 new net::TransportSecurityState());
390 main_context_->set_cert_transparency_verifier(new net::MultiLogCTVerifier());
391 main_context_->set_ct_policy_enforcer(new net::CTPolicyEnforcer());
388 http_server_properties_.reset(new net::HttpServerPropertiesImpl()); 392 http_server_properties_.reset(new net::HttpServerPropertiesImpl());
389 main_context_->set_http_server_properties(http_server_properties_.get()); 393 main_context_->set_http_server_properties(http_server_properties_.get());
390 // TODO(rdsmith): Note that the ".release()" calls below are leaking 394 // TODO(rdsmith): Note that the ".release()" calls below are leaking
391 // the objects in question; this should be fixed by having an object 395 // the objects in question; this should be fixed by having an object
392 // corresponding to URLRequestContextStorage that actually owns those 396 // corresponding to URLRequestContextStorage that actually owns those
393 // objects. See http://crbug.com/523858. 397 // objects. See http://crbug.com/523858.
394 main_context_->set_host_resolver( 398 main_context_->set_host_resolver(
395 net::HostResolver::CreateDefaultResolver(nullptr).release()); 399 net::HostResolver::CreateDefaultResolver(nullptr).release());
396 main_context_->set_cert_verifier( 400 main_context_->set_cert_verifier(
397 net::CertVerifier::CreateDefault().release()); 401 net::CertVerifier::CreateDefault().release());
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 482
479 return user_agent_settings->GetUserAgent(); 483 return user_agent_settings->GetUserAgent();
480 } 484 }
481 485
482 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) { 486 void CrNetEnvironment::ClearCache(ClearCacheCallback callback) {
483 PostToNetworkThread( 487 PostToNetworkThread(
484 FROM_HERE, 488 FROM_HERE,
485 base::Bind(&net::ClearHttpCache, main_context_getter_, 489 base::Bind(&net::ClearHttpCache, main_context_getter_,
486 network_io_thread_->task_runner(), base::BindBlock(callback))); 490 network_io_thread_->task_runner(), base::BindBlock(callback)));
487 } 491 }
OLDNEW
« no previous file with comments | « google_apis/gcm/tools/mcs_probe.cc ('k') | ios/web/shell/shell_url_request_context_getter.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698