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 "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/chromeos/net/proxy_config_handler.h" | 11 #include "chrome/browser/chromeos/net/proxy_config_handler.h" |
11 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 12 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
12 #include "chrome/browser/prefs/proxy_prefs.h" | 13 #include "chrome/browser/prefs/proxy_prefs.h" |
13 #include "chrome/common/chrome_notification_types.h" | |
14 #include "chromeos/network/network_state.h" | 14 #include "chromeos/network/network_state.h" |
15 #include "chromeos/network/network_state_handler.h" | 15 #include "chromeos/network/network_state_handler.h" |
16 #include "net/proxy/proxy_config.h" | 16 #include "net/proxy/proxy_config.h" |
17 #include "third_party/cros_system_api/dbus/service_constants.h" | 17 #include "third_party/cros_system_api/dbus/service_constants.h" |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 // Timeout to smooth temporary network state transitions for flaky networks. | 21 // Timeout to smooth temporary network state transitions for flaky networks. |
22 const int kNetworkStateCheckDelaySec = 3; | 22 const int kNetworkStateCheckDelaySec = 3; |
23 | 23 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 scoped_ptr<ProxyConfigDictionary> proxy_dict( | 220 scoped_ptr<ProxyConfigDictionary> proxy_dict( |
221 proxy_config::GetProxyConfigForNetwork(*network)); | 221 proxy_config::GetProxyConfigForNetwork(*network)); |
222 ProxyPrefs::ProxyMode mode; | 222 ProxyPrefs::ProxyMode mode; |
223 return (proxy_dict && | 223 return (proxy_dict && |
224 proxy_dict->GetMode(&mode) && | 224 proxy_dict->GetMode(&mode) && |
225 mode == ProxyPrefs::MODE_FIXED_SERVERS); | 225 mode == ProxyPrefs::MODE_FIXED_SERVERS); |
226 } | 226 } |
227 | 227 |
228 } // namespace chromeos | 228 } // namespace chromeos |
OLD | NEW |