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