| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/chrome/browser/ios_chrome_io_thread.h" | 5 #include "ios/chrome/browser/ios_chrome_io_thread.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 #include "net/cookies/cookie_monster.h" | 53 #include "net/cookies/cookie_monster.h" |
| 54 #include "net/cookies/cookie_store.h" | 54 #include "net/cookies/cookie_store.h" |
| 55 #include "net/dns/host_cache.h" | 55 #include "net/dns/host_cache.h" |
| 56 #include "net/dns/host_resolver.h" | 56 #include "net/dns/host_resolver.h" |
| 57 #include "net/dns/mapped_host_resolver.h" | 57 #include "net/dns/mapped_host_resolver.h" |
| 58 #include "net/http/http_auth_filter.h" | 58 #include "net/http/http_auth_filter.h" |
| 59 #include "net/http/http_auth_handler_factory.h" | 59 #include "net/http/http_auth_handler_factory.h" |
| 60 #include "net/http/http_auth_preferences.h" | 60 #include "net/http/http_auth_preferences.h" |
| 61 #include "net/http/http_network_layer.h" | 61 #include "net/http/http_network_layer.h" |
| 62 #include "net/http/http_server_properties_impl.h" | 62 #include "net/http/http_server_properties_impl.h" |
| 63 #include "net/log/net_log_event_type.h" |
| 63 #include "net/nqe/external_estimate_provider.h" | 64 #include "net/nqe/external_estimate_provider.h" |
| 64 #include "net/nqe/network_quality_estimator.h" | 65 #include "net/nqe/network_quality_estimator.h" |
| 65 #include "net/proxy/proxy_config_service.h" | 66 #include "net/proxy/proxy_config_service.h" |
| 66 #include "net/proxy/proxy_script_fetcher_impl.h" | 67 #include "net/proxy/proxy_script_fetcher_impl.h" |
| 67 #include "net/proxy/proxy_service.h" | 68 #include "net/proxy/proxy_service.h" |
| 68 #include "net/socket/tcp_client_socket.h" | 69 #include "net/socket/tcp_client_socket.h" |
| 69 #include "net/spdy/spdy_session.h" | 70 #include "net/spdy/spdy_session.h" |
| 70 #include "net/ssl/channel_id_service.h" | 71 #include "net/ssl/channel_id_service.h" |
| 71 #include "net/ssl/default_channel_id_store.h" | 72 #include "net/ssl/default_channel_id_store.h" |
| 72 #include "net/url_request/data_protocol_handler.h" | 73 #include "net/url_request/data_protocol_handler.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 ~LoggingNetworkChangeObserver() override { | 154 ~LoggingNetworkChangeObserver() override { |
| 154 net::NetworkChangeNotifier::RemoveIPAddressObserver(this); | 155 net::NetworkChangeNotifier::RemoveIPAddressObserver(this); |
| 155 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); | 156 net::NetworkChangeNotifier::RemoveConnectionTypeObserver(this); |
| 156 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); | 157 net::NetworkChangeNotifier::RemoveNetworkChangeObserver(this); |
| 157 } | 158 } |
| 158 | 159 |
| 159 // NetworkChangeNotifier::IPAddressObserver implementation. | 160 // NetworkChangeNotifier::IPAddressObserver implementation. |
| 160 void OnIPAddressChanged() override { | 161 void OnIPAddressChanged() override { |
| 161 VLOG(1) << "Observed a change to the network IP addresses"; | 162 VLOG(1) << "Observed a change to the network IP addresses"; |
| 162 | 163 |
| 163 net_log_->AddGlobalEntry(net::NetLog::TYPE_NETWORK_IP_ADDRESSES_CHANGED); | 164 net_log_->AddGlobalEntry( |
| 165 net::NetLogEventType::NETWORK_IP_ADDRESSES_CHANGED); |
| 164 } | 166 } |
| 165 | 167 |
| 166 // NetworkChangeNotifier::ConnectionTypeObserver implementation. | 168 // NetworkChangeNotifier::ConnectionTypeObserver implementation. |
| 167 void OnConnectionTypeChanged( | 169 void OnConnectionTypeChanged( |
| 168 net::NetworkChangeNotifier::ConnectionType type) override { | 170 net::NetworkChangeNotifier::ConnectionType type) override { |
| 169 std::string type_as_string = | 171 std::string type_as_string = |
| 170 net::NetworkChangeNotifier::ConnectionTypeToString(type); | 172 net::NetworkChangeNotifier::ConnectionTypeToString(type); |
| 171 | 173 |
| 172 VLOG(1) << "Observed a change to network connectivity state " | 174 VLOG(1) << "Observed a change to network connectivity state " |
| 173 << type_as_string; | 175 << type_as_string; |
| 174 | 176 |
| 175 net_log_->AddGlobalEntry( | 177 net_log_->AddGlobalEntry( |
| 176 net::NetLog::TYPE_NETWORK_CONNECTIVITY_CHANGED, | 178 net::NetLogEventType::NETWORK_CONNECTIVITY_CHANGED, |
| 177 net::NetLog::StringCallback("new_connection_type", &type_as_string)); | 179 net::NetLog::StringCallback("new_connection_type", &type_as_string)); |
| 178 } | 180 } |
| 179 | 181 |
| 180 // NetworkChangeNotifier::NetworkChangeObserver implementation. | 182 // NetworkChangeNotifier::NetworkChangeObserver implementation. |
| 181 void OnNetworkChanged( | 183 void OnNetworkChanged( |
| 182 net::NetworkChangeNotifier::ConnectionType type) override { | 184 net::NetworkChangeNotifier::ConnectionType type) override { |
| 183 std::string type_as_string = | 185 std::string type_as_string = |
| 184 net::NetworkChangeNotifier::ConnectionTypeToString(type); | 186 net::NetworkChangeNotifier::ConnectionTypeToString(type); |
| 185 | 187 |
| 186 VLOG(1) << "Observed a network change to state " << type_as_string; | 188 VLOG(1) << "Observed a network change to state " << type_as_string; |
| 187 | 189 |
| 188 net_log_->AddGlobalEntry( | 190 net_log_->AddGlobalEntry( |
| 189 net::NetLog::TYPE_NETWORK_CHANGED, | 191 net::NetLogEventType::NETWORK_CHANGED, |
| 190 net::NetLog::StringCallback("new_connection_type", &type_as_string)); | 192 net::NetLog::StringCallback("new_connection_type", &type_as_string)); |
| 191 } | 193 } |
| 192 | 194 |
| 193 private: | 195 private: |
| 194 net::NetLog* net_log_; | 196 net::NetLog* net_log_; |
| 195 DISALLOW_COPY_AND_ASSIGN(LoggingNetworkChangeObserver); | 197 DISALLOW_COPY_AND_ASSIGN(LoggingNetworkChangeObserver); |
| 196 }; | 198 }; |
| 197 | 199 |
| 198 class SystemURLRequestContextGetter : public net::URLRequestContextGetter { | 200 class SystemURLRequestContextGetter : public net::URLRequestContextGetter { |
| 199 public: | 201 public: |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 562 | 564 |
| 563 globals->system_http_network_session.reset( | 565 globals->system_http_network_session.reset( |
| 564 new net::HttpNetworkSession(system_params)); | 566 new net::HttpNetworkSession(system_params)); |
| 565 globals->system_http_transaction_factory.reset( | 567 globals->system_http_transaction_factory.reset( |
| 566 new net::HttpNetworkLayer(globals->system_http_network_session.get())); | 568 new net::HttpNetworkLayer(globals->system_http_network_session.get())); |
| 567 context->set_http_transaction_factory( | 569 context->set_http_transaction_factory( |
| 568 globals->system_http_transaction_factory.get()); | 570 globals->system_http_transaction_factory.get()); |
| 569 | 571 |
| 570 return context; | 572 return context; |
| 571 } | 573 } |
| OLD | NEW |