| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "chromeos/network/network_state_handler_observer.h" | 12 #include "chromeos/network/network_state_handler_observer.h" |
| 13 #include "chromeos/network/portal_detector/network_portal_detector.h" | 13 #include "chromeos/network/portal_detector/network_portal_detector.h" |
| 14 #include "ui/message_center/notification.h" | 14 #include "ui/message_center/notification.h" |
| 15 | 15 |
| 16 namespace extensions { | 16 namespace extensions { |
| 17 class Extension; | 17 class Extension; |
| 18 class NetworkingConfigService; | 18 class NetworkingConfigService; |
| 19 } | 19 } |
| 20 | 20 |
| 21 namespace chromeos { | 21 namespace chromeos { |
| 22 | 22 |
| 23 class NetworkState; | 23 class NetworkState; |
| 24 class NetworkPortalWebDialog; | 24 class NetworkPortalWebDialog; |
| 25 class NetworkPortalNotificationControllerTest; | 25 class NetworkPortalNotificationControllerTest; |
| 26 | 26 |
| 27 // Shows a message center notification when the networking stack detects a |
| 28 // captive portal. |
| 27 class NetworkPortalNotificationController | 29 class NetworkPortalNotificationController |
| 28 : public NetworkStateHandlerObserver, | 30 : public NetworkStateHandlerObserver, |
| 29 public NetworkPortalDetector::Observer { | 31 public NetworkPortalDetector::Observer { |
| 30 public: | 32 public: |
| 31 // The values of these metrics are being used for UMA gathering, so it is | 33 // The values of these metrics are being used for UMA gathering, so it is |
| 32 // important that they don't change between releases. | 34 // important that they don't change between releases. |
| 33 enum NotificationMetric { | 35 enum NotificationMetric { |
| 34 NOTIFICATION_METRIC_DISPLAYED = 0, | 36 NOTIFICATION_METRIC_DISPLAYED = 0, |
| 35 | 37 |
| 36 // This value is no longer used by is still kept here just for | 38 // This value is no longer used by is still kept here just for |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 base::Closure retry_detection_callback_; | 142 base::Closure retry_detection_callback_; |
| 141 | 143 |
| 142 base::WeakPtrFactory<NetworkPortalNotificationController> weak_factory_; | 144 base::WeakPtrFactory<NetworkPortalNotificationController> weak_factory_; |
| 143 | 145 |
| 144 DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationController); | 146 DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationController); |
| 145 }; | 147 }; |
| 146 | 148 |
| 147 } // namespace chromeos | 149 } // namespace chromeos |
| 148 | 150 |
| 149 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_ | 151 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_ |
| OLD | NEW |