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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
509 } | 509 } |
510 | 510 |
511 // This is safe to call in any state. | 511 // This is safe to call in any state. |
512 if (dhcp_proxy_script_fetcher_) | 512 if (dhcp_proxy_script_fetcher_) |
513 dhcp_proxy_script_fetcher_->Cancel(); | 513 dhcp_proxy_script_fetcher_->Cancel(); |
514 | 514 |
515 DidComplete(); | 515 DidComplete(); |
516 } | 516 } |
517 | 517 |
518 } // namespace net | 518 } // namespace net |
OLD | NEW |