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 #include "chrome/browser/io_thread.h" | 5 #include "chrome/browser/io_thread.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 net::NetworkChangeNotifier::AddIPAddressObserver(this); | 176 net::NetworkChangeNotifier::AddIPAddressObserver(this); |
177 } | 177 } |
178 | 178 |
179 ~LoggingNetworkChangeObserver() { | 179 ~LoggingNetworkChangeObserver() { |
180 net::NetworkChangeNotifier::RemoveIPAddressObserver(this); | 180 net::NetworkChangeNotifier::RemoveIPAddressObserver(this); |
181 } | 181 } |
182 | 182 |
183 virtual void OnIPAddressChanged() { | 183 virtual void OnIPAddressChanged() { |
184 VLOG(1) << "Observed a change to the network IP addresses"; | 184 VLOG(1) << "Observed a change to the network IP addresses"; |
185 | 185 |
186 net_log_->AddEntry(net::NetLog::TYPE_NETWORK_IP_ADDRESSES_CHANGED, | 186 net_log_->AddGlobalEntry(net::NetLog::TYPE_NETWORK_IP_ADDRESSES_CHANGED, |
187 base::TimeTicks::Now(), | 187 NULL); |
188 net::NetLog::Source(), | |
189 net::NetLog::PHASE_NONE, | |
190 NULL); | |
191 } | 188 } |
192 | 189 |
193 private: | 190 private: |
194 net::NetLog* net_log_; | 191 net::NetLog* net_log_; |
195 DISALLOW_COPY_AND_ASSIGN(LoggingNetworkChangeObserver); | 192 DISALLOW_COPY_AND_ASSIGN(LoggingNetworkChangeObserver); |
196 }; | 193 }; |
197 | 194 |
198 // Create a separate request context for PAC fetches to avoid reference cycles. | 195 // Create a separate request context for PAC fetches to avoid reference cycles. |
199 // See IOThread::Globals for details. | 196 // See IOThread::Globals for details. |
200 scoped_refptr<net::URLRequestContext> | 197 scoped_refptr<net::URLRequestContext> |
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 new net::HttpNetworkLayer( | 602 new net::HttpNetworkLayer( |
606 new net::HttpNetworkSession(system_params))); | 603 new net::HttpNetworkSession(system_params))); |
607 globals_->system_ftp_transaction_factory.reset( | 604 globals_->system_ftp_transaction_factory.reset( |
608 new net::FtpNetworkLayer(globals_->host_resolver.get())); | 605 new net::FtpNetworkLayer(globals_->host_resolver.get())); |
609 globals_->system_request_context = | 606 globals_->system_request_context = |
610 ConstructSystemRequestContext(globals_, net_log_); | 607 ConstructSystemRequestContext(globals_, net_log_); |
611 | 608 |
612 sdch_manager_->set_sdch_fetcher( | 609 sdch_manager_->set_sdch_fetcher( |
613 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); | 610 new SdchDictionaryFetcher(system_url_request_context_getter_.get())); |
614 } | 611 } |
OLD | NEW |