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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_
6 #define CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_
10 #include "base/macros.h"
11 #include "chrome/browser/chromeos/net/network_portal_detector.h"
17 class NetworkPortalNotificationController
{
19 enum NotificationMetric
{
20 NOTIFICATION_METRIC_DISPLAYED
= 0,
21 NOTIFICATION_METRIC_ERROR
,
22 NOTIFICATION_METRIC_COUNT
25 enum UserActionMetric
{
26 USER_ACTION_METRIC_CLICKED
,
27 USER_ACTION_METRIC_CLOSED
,
28 USER_ACTION_METRIC_IGNORED
,
29 USER_ACTION_METRIC_COUNT
32 static const char kNotificationId
[];
34 static const char kNotificationMetric
[];
35 static const char kUserActionMetric
[];
37 NetworkPortalNotificationController();
38 virtual ~NetworkPortalNotificationController();
40 void OnPortalDetectionCompleted(
41 const NetworkState
* network
,
42 const NetworkPortalDetector::CaptivePortalState
& state
);
45 // Last network path for which notification was displayed.
46 std::string last_network_path_
;
48 DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationController
);
51 } // namespace chromeos
53 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_