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

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

Issue 1870793002: Convert //chrome/browser/chromeos from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months 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"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 // Browser tests should be able to verify that NetworkPortalWebDialog is 88 // Browser tests should be able to verify that NetworkPortalWebDialog is
89 // shown. 89 // shown.
90 const NetworkPortalWebDialog* GetDialogForTesting() const; 90 const NetworkPortalWebDialog* GetDialogForTesting() const;
91 91
92 private: 92 private:
93 friend NetworkPortalNotificationControllerTest; 93 friend NetworkPortalNotificationControllerTest;
94 94
95 // Creates the default notification informing the user that a captive portal 95 // Creates the default notification informing the user that a captive portal
96 // has been detected. On click the captive portal login page is opened in the 96 // has been detected. On click the captive portal login page is opened in the
97 // browser. 97 // browser.
98 scoped_ptr<message_center::Notification> 98 std::unique_ptr<message_center::Notification>
99 CreateDefaultCaptivePortalNotification(const NetworkState* network); 99 CreateDefaultCaptivePortalNotification(const NetworkState* network);
100 100
101 // Creates an advanced captive portal notification informing the user that a 101 // Creates an advanced captive portal notification informing the user that a
102 // captive portal has been detected and an extension has registered to perform 102 // captive portal has been detected and an extension has registered to perform
103 // captive portal authentication for that network. Gives the user the choice 103 // captive portal authentication for that network. Gives the user the choice
104 // to either authenticate using that extension or open the captive portal 104 // to either authenticate using that extension or open the captive portal
105 // login page in the browser. 105 // login page in the browser.
106 scoped_ptr<message_center::Notification> 106 std::unique_ptr<message_center::Notification>
107 CreateCaptivePortalNotificationForExtension( 107 CreateCaptivePortalNotificationForExtension(
108 const NetworkState* network, 108 const NetworkState* network,
109 extensions::NetworkingConfigService* networking_config_service, 109 extensions::NetworkingConfigService* networking_config_service,
110 const extensions::Extension* extension); 110 const extensions::Extension* extension);
111 111
112 // Constructs a notification to inform the user that a captive portal has been 112 // Constructs a notification to inform the user that a captive portal has been
113 // detected. 113 // detected.
114 scoped_ptr<message_center::Notification> GetNotification( 114 std::unique_ptr<message_center::Notification> GetNotification(
115 const NetworkState* network, 115 const NetworkState* network,
116 const NetworkPortalDetector::CaptivePortalState& state); 116 const NetworkPortalDetector::CaptivePortalState& state);
117 117
118 // NetworkStateHandlerObserver: 118 // NetworkStateHandlerObserver:
119 void DefaultNetworkChanged(const NetworkState* network) override; 119 void DefaultNetworkChanged(const NetworkState* network) override;
120 120
121 // NetworkPortalDetector::Observer: 121 // NetworkPortalDetector::Observer:
122 void OnPortalDetectionCompleted( 122 void OnPortalDetectionCompleted(
123 const NetworkState* network, 123 const NetworkState* network,
124 const NetworkPortalDetector::CaptivePortalState& state) override; 124 const NetworkPortalDetector::CaptivePortalState& state) override;
(...skipping 15 matching lines...) Expand all
140 base::Closure retry_detection_callback_; 140 base::Closure retry_detection_callback_;
141 141
142 base::WeakPtrFactory<NetworkPortalNotificationController> weak_factory_; 142 base::WeakPtrFactory<NetworkPortalNotificationController> weak_factory_;
143 143
144 DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationController); 144 DISALLOW_COPY_AND_ASSIGN(NetworkPortalNotificationController);
145 }; 145 };
146 146
147 } // namespace chromeos 147 } // namespace chromeos
148 148
149 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_ 149 #endif // CHROME_BROWSER_CHROMEOS_NET_NETWORK_PORTAL_NOTIFICATION_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698