| 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_script_decider.h" | 5 #include "net/proxy/proxy_script_decider.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/format_macros.h" | 10 #include "base/format_macros.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // | 49 // |
| 50 // For more details, also check out this comment: | 50 // For more details, also check out this comment: |
| 51 // http://code.google.com/p/chromium/issues/detail?id=18575#c20 | 51 // http://code.google.com/p/chromium/issues/detail?id=18575#c20 |
| 52 namespace { | 52 namespace { |
| 53 const char kWpadUrl[] = "http://wpad/wpad.dat"; | 53 const char kWpadUrl[] = "http://wpad/wpad.dat"; |
| 54 const int kQuickCheckDelayMs = 1000; | 54 const int kQuickCheckDelayMs = 1000; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 base::Value* ProxyScriptDecider::PacSource::NetLogCallback( | 57 base::Value* ProxyScriptDecider::PacSource::NetLogCallback( |
| 58 const GURL* effective_pac_url, | 58 const GURL* effective_pac_url, |
| 59 NetLog::LogLevel /* log_level */) const { | 59 NetLogCaptureMode /* capture_mode */) const { |
| 60 base::DictionaryValue* dict = new base::DictionaryValue(); | 60 base::DictionaryValue* dict = new base::DictionaryValue(); |
| 61 std::string source; | 61 std::string source; |
| 62 switch (type) { | 62 switch (type) { |
| 63 case PacSource::WPAD_DHCP: | 63 case PacSource::WPAD_DHCP: |
| 64 source = "WPAD DHCP"; | 64 source = "WPAD DHCP"; |
| 65 break; | 65 break; |
| 66 case PacSource::WPAD_DNS: | 66 case PacSource::WPAD_DNS: |
| 67 source = "WPAD DNS: "; | 67 source = "WPAD DNS: "; |
| 68 source += effective_pac_url->possibly_invalid_spec(); | 68 source += effective_pac_url->possibly_invalid_spec(); |
| 69 break; | 69 break; |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 } | 475 } |
| 476 | 476 |
| 477 // This is safe to call in any state. | 477 // This is safe to call in any state. |
| 478 if (dhcp_proxy_script_fetcher_) | 478 if (dhcp_proxy_script_fetcher_) |
| 479 dhcp_proxy_script_fetcher_->Cancel(); | 479 dhcp_proxy_script_fetcher_->Cancel(); |
| 480 | 480 |
| 481 DidComplete(); | 481 DidComplete(); |
| 482 } | 482 } |
| 483 | 483 |
| 484 } // namespace net | 484 } // namespace net |
| OLD | NEW |