| 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 "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/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 NetLog::LogLevel /* log_level */) { | 294 NetLog::LogLevel /* log_level */) { |
| 295 base::DictionaryValue* dict = new base::DictionaryValue(); | 295 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 296 dict->SetString("pac_string", result->ToPacString()); | 296 dict->SetString("pac_string", result->ToPacString()); |
| 297 return dict; | 297 return dict; |
| 298 } | 298 } |
| 299 | 299 |
| 300 #if defined(OS_CHROMEOS) | 300 #if defined(OS_CHROMEOS) |
| 301 class UnsetProxyConfigService : public ProxyConfigService { | 301 class UnsetProxyConfigService : public ProxyConfigService { |
| 302 public: | 302 public: |
| 303 UnsetProxyConfigService() {} | 303 UnsetProxyConfigService() {} |
| 304 virtual ~UnsetProxyConfigService() {} | 304 ~UnsetProxyConfigService() override {} |
| 305 | 305 |
| 306 virtual void AddObserver(Observer* observer) override {} | 306 void AddObserver(Observer* observer) override {} |
| 307 virtual void RemoveObserver(Observer* observer) override {} | 307 void RemoveObserver(Observer* observer) override {} |
| 308 virtual ConfigAvailability GetLatestProxyConfig( | 308 ConfigAvailability GetLatestProxyConfig(ProxyConfig* config) override { |
| 309 ProxyConfig* config) override { | |
| 310 return CONFIG_UNSET; | 309 return CONFIG_UNSET; |
| 311 } | 310 } |
| 312 }; | 311 }; |
| 313 #endif | 312 #endif |
| 314 | 313 |
| 315 } // namespace | 314 } // namespace |
| 316 | 315 |
| 317 // ProxyService::InitProxyResolver -------------------------------------------- | 316 // ProxyService::InitProxyResolver -------------------------------------------- |
| 318 | 317 |
| 319 // This glues together two asynchronous steps: | 318 // This glues together two asynchronous steps: |
| (...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1581 State previous_state = ResetProxyConfig(false); | 1580 State previous_state = ResetProxyConfig(false); |
| 1582 if (previous_state != STATE_NONE) | 1581 if (previous_state != STATE_NONE) |
| 1583 ApplyProxyConfigIfAvailable(); | 1582 ApplyProxyConfigIfAvailable(); |
| 1584 } | 1583 } |
| 1585 | 1584 |
| 1586 void ProxyService::OnDNSChanged() { | 1585 void ProxyService::OnDNSChanged() { |
| 1587 OnIPAddressChanged(); | 1586 OnIPAddressChanged(); |
| 1588 } | 1587 } |
| 1589 | 1588 |
| 1590 } // namespace net | 1589 } // namespace net |
| OLD | NEW |