| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 "net/proxy/proxy_service.h" | 5 #include "net/proxy/proxy_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 | 601 |
| 602 SetConfig(latest); | 602 SetConfig(latest); |
| 603 } | 603 } |
| 604 | 604 |
| 605 void ProxyService::SetConfig(const ProxyConfig& config) { | 605 void ProxyService::SetConfig(const ProxyConfig& config) { |
| 606 config_ = config; | 606 config_ = config; |
| 607 | 607 |
| 608 // Increment the ID to reflect that the config has changed. | 608 // Increment the ID to reflect that the config has changed. |
| 609 config_.set_id(next_config_id_++); | 609 config_.set_id(next_config_id_++); |
| 610 | 610 |
| 611 LOG(INFO) << "New proxy configuration was loaded:\n" << config_; | |
| 612 | |
| 613 // Reset state associated with latest config. | 611 // Reset state associated with latest config. |
| 614 config_is_bad_ = false; | 612 config_is_bad_ = false; |
| 615 proxy_retry_info_.clear(); | 613 proxy_retry_info_.clear(); |
| 616 | 614 |
| 617 // Cancel any PAC fetching / ProxyResolver::SetPacScript() which was | 615 // Cancel any PAC fetching / ProxyResolver::SetPacScript() which was |
| 618 // in progress for the previous configuration. | 616 // in progress for the previous configuration. |
| 619 init_proxy_resolver_.reset(); | 617 init_proxy_resolver_.reset(); |
| 620 should_use_proxy_resolver_ = false; | 618 should_use_proxy_resolver_ = false; |
| 621 | 619 |
| 622 // Start downloading + testing the PAC scripts for this new configuration. | 620 // Start downloading + testing the PAC scripts for this new configuration. |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 OnCompletion(result_); | 791 OnCompletion(result_); |
| 794 } | 792 } |
| 795 } | 793 } |
| 796 | 794 |
| 797 void SyncProxyServiceHelper::OnCompletion(int rv) { | 795 void SyncProxyServiceHelper::OnCompletion(int rv) { |
| 798 result_ = rv; | 796 result_ = rv; |
| 799 event_.Signal(); | 797 event_.Signal(); |
| 800 } | 798 } |
| 801 | 799 |
| 802 } // namespace net | 800 } // namespace net |
| OLD | NEW |