| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/chromeos/net/network_change_notifier_chromeos.h" | 5 #include "chrome/browser/chromeos/net/network_change_notifier_chromeos.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "chrome/browser/chromeos/cros/cros_library.h" | 8 #include "chrome/browser/chromeos/cros/cros_library.h" |
| 9 #include "content/public/browser/browser_thread.h" | 9 #include "content/public/browser/browser_thread.h" |
| 10 | 10 |
| 11 using content::BrowserThread; |
| 12 |
| 11 namespace { | 13 namespace { |
| 12 | 14 |
| 13 // Delay for online change notification reporting. | 15 // Delay for online change notification reporting. |
| 14 const int kOnlineNotificationDelayMS = 500; | 16 const int kOnlineNotificationDelayMS = 500; |
| 15 const int kInitialNotificationCheckDelayMS = 1000; | 17 const int kInitialNotificationCheckDelayMS = 1000; |
| 16 | 18 |
| 17 bool IsOnline(chromeos::ConnectionState state) { | 19 bool IsOnline(chromeos::ConnectionState state) { |
| 18 return state == chromeos::STATE_ONLINE || | 20 return state == chromeos::STATE_ONLINE || |
| 19 state == chromeos::STATE_PORTAL; | 21 state == chromeos::STATE_PORTAL; |
| 20 } | 22 } |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 | 251 |
| 250 // static | 252 // static |
| 251 void NetworkChangeNotifierChromeos::UpdateInitialState( | 253 void NetworkChangeNotifierChromeos::UpdateInitialState( |
| 252 NetworkChangeNotifierChromeos* self) { | 254 NetworkChangeNotifierChromeos* self) { |
| 253 chromeos::NetworkLibrary* net = | 255 chromeos::NetworkLibrary* net = |
| 254 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); | 256 chromeos::CrosLibrary::Get()->GetNetworkLibrary(); |
| 255 self->UpdateNetworkState(net); | 257 self->UpdateNetworkState(net); |
| 256 } | 258 } |
| 257 | 259 |
| 258 } // namespace net | 260 } // namespace net |
| OLD | NEW |