Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: chrome/browser/chromeos/net/network_portal_notification_controller.h

Issue 750153002: ChromeOS: bypass proxy for captive portal authorization. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chromeos/network/portal_detector/network_portal_detector.h" 11 #include "chromeos/network/portal_detector/network_portal_detector.h"
12 12
13 namespace chromeos { 13 namespace chromeos {
14 14
15 class NetworkState; 15 class NetworkState;
16 class NetworkPortalWebDialog;
16 17
17 class NetworkPortalNotificationController { 18 class NetworkPortalNotificationController
19 : public base::SupportsWeakPtr<NetworkPortalNotificationController> {
18 public: 20 public:
19 // The values of these metrics are being used for UMA gathering, so it is 21 // The values of these metrics are being used for UMA gathering, so it is
20 // important that they don't change between releases. 22 // important that they don't change between releases.
21 enum NotificationMetric { 23 enum NotificationMetric {
22 NOTIFICATION_METRIC_DISPLAYED = 0, 24 NOTIFICATION_METRIC_DISPLAYED = 0,
23 25
24 // This value is no longer used by is still kept here just for 26 // This value is no longer used by is still kept here just for
25 // unify with histograms.xml. 27 // unify with histograms.xml.
26 NOTIFICATION_METRIC_ERROR = 1, 28 NOTIFICATION_METRIC_ERROR = 1,
27 29
(...skipping 12 matching lines...) Expand all
40 static const char kNotificationMetric[]; 42 static const char kNotificationMetric[];
41 static const char kUserActionMetric[]; 43 static const char kUserActionMetric[];
42 44
43 NetworkPortalNotificationController(); 45 NetworkPortalNotificationController();
44 virtual ~NetworkPortalNotificationController(); 46 virtual ~NetworkPortalNotificationController();
45 47
46 void OnPortalDetectionCompleted( 48 void OnPortalDetectionCompleted(
47 const NetworkState* network, 49 const NetworkState* network,
48 const NetworkPortalDetector::CaptivePortalState& state); 50 const NetworkPortalDetector::CaptivePortalState& state);
49 51
52 // Creates NetworkPortalWebDialog.
53 void ShowDialog();
54 void OnDialogDestroyed(const NetworkPortalWebDialog* dialog);
ygorshenin1 2014/11/24 15:02:09 nit: insert a blank line between these two methods
Alexander Alekseev 2014/11/26 00:26:28 Done.
55
50 private: 56 private:
51 // Last network path for which notification was displayed. 57 // Last network path for which notification was displayed.
52 std::string last_network_path_; 58 std::string last_network_path_;
53 59
60 NetworkPortalWebDialog* dialog_;
61
54 DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationController); 62 DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationController);
55 }; 63 };
56 64
57 } // namespace chromeos 65 } // namespace chromeos
58 66
59 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_ 67 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698