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

Side by Side Diff: chrome/browser/chromeos/login/screens/error_screen.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: iwyu fixes 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LOGIN_SCREENS_ERROR_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_H_
7 7
8 #include <memory>
9
8 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
9 #include "base/macros.h" 11 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
12 #include "chrome/browser/chromeos/login/screens/network_error.h" 13 #include "chrome/browser/chromeos/login/screens/network_error.h"
13 #include "chrome/browser/chromeos/login/screens/network_error_model.h" 14 #include "chrome/browser/chromeos/login/screens/network_error_model.h"
14 #include "chrome/browser/chromeos/settings/device_settings_service.h" 15 #include "chrome/browser/chromeos/settings/device_settings_service.h"
15 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" 16 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
16 #include "chrome/browser/ui/webui/chromeos/login/oobe_screen.h" 17 #include "chrome/browser/ui/webui/chromeos/login/oobe_screen.h"
17 #include "chromeos/login/auth/login_performer.h" 18 #include "chromeos/login/auth/login_performer.h"
18 19
19 namespace chromeos { 20 namespace chromeos {
20 21
21 class BaseScreenDelegate; 22 class BaseScreenDelegate;
22 class CaptivePortalWindowProxy; 23 class CaptivePortalWindowProxy;
23 class NetworkErrorView; 24 class NetworkErrorView;
24 25
25 // Controller for the error screen. 26 // Controller for the error screen.
26 class ErrorScreen : public NetworkErrorModel, public LoginPerformer::Delegate { 27 class ErrorScreen : public NetworkErrorModel, public LoginPerformer::Delegate {
27 public: 28 public:
28 typedef scoped_ptr<base::CallbackList<void()>::Subscription> 29 typedef std::unique_ptr<base::CallbackList<void()>::Subscription>
29 ConnectRequestCallbackSubscription; 30 ConnectRequestCallbackSubscription;
30 31
31 ErrorScreen(BaseScreenDelegate* base_screen_delegate, NetworkErrorView* view); 32 ErrorScreen(BaseScreenDelegate* base_screen_delegate, NetworkErrorView* view);
32 ~ErrorScreen() override; 33 ~ErrorScreen() override;
33 34
34 // NetworkErrorModel: 35 // NetworkErrorModel:
35 void PrepareToShow() override; 36 void PrepareToShow() override;
36 void Show() override; 37 void Show() override;
37 void Hide() override; 38 void Hide() override;
38 void OnShow() override; 39 void OnShow() override;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // The user indicated to make an attempt to connect to the network. 93 // The user indicated to make an attempt to connect to the network.
93 void OnConnectRequested(); 94 void OnConnectRequested();
94 95
95 // Handles the response of an ownership check and starts the guest session if 96 // Handles the response of an ownership check and starts the guest session if
96 // applicable. 97 // applicable.
97 void StartGuestSessionAfterOwnershipCheck( 98 void StartGuestSessionAfterOwnershipCheck(
98 DeviceSettingsService::OwnershipStatus ownership_status); 99 DeviceSettingsService::OwnershipStatus ownership_status);
99 100
100 NetworkErrorView* view_ = nullptr; 101 NetworkErrorView* view_ = nullptr;
101 102
102 scoped_ptr<LoginPerformer> guest_login_performer_; 103 std::unique_ptr<LoginPerformer> guest_login_performer_;
103 104
104 // Proxy which manages showing of the window for captive portal entering. 105 // Proxy which manages showing of the window for captive portal entering.
105 scoped_ptr<CaptivePortalWindowProxy> captive_portal_window_proxy_; 106 std::unique_ptr<CaptivePortalWindowProxy> captive_portal_window_proxy_;
106 107
107 // Network state informer used to keep error screen up. 108 // Network state informer used to keep error screen up.
108 scoped_refptr<NetworkStateInformer> network_state_informer_; 109 scoped_refptr<NetworkStateInformer> network_state_informer_;
109 110
110 NetworkError::UIState ui_state_ = NetworkError::UI_STATE_UNKNOWN; 111 NetworkError::UIState ui_state_ = NetworkError::UI_STATE_UNKNOWN;
111 NetworkError::ErrorState error_state_ = NetworkError::ERROR_STATE_UNKNOWN; 112 NetworkError::ErrorState error_state_ = NetworkError::ERROR_STATE_UNKNOWN;
112 113
113 OobeScreen parent_screen_ = OobeScreen::SCREEN_UNKNOWN; 114 OobeScreen parent_screen_ = OobeScreen::SCREEN_UNKNOWN;
114 115
115 // Optional callback that is called when NetworkError screen is hidden. 116 // Optional callback that is called when NetworkError screen is hidden.
116 scoped_ptr<base::Closure> on_hide_callback_; 117 std::unique_ptr<base::Closure> on_hide_callback_;
117 118
118 // Callbacks to be invoked when a connection attempt is requested. 119 // Callbacks to be invoked when a connection attempt is requested.
119 base::CallbackList<void()> connect_request_callbacks_; 120 base::CallbackList<void()> connect_request_callbacks_;
120 121
121 base::WeakPtrFactory<ErrorScreen> weak_factory_; 122 base::WeakPtrFactory<ErrorScreen> weak_factory_;
122 123
123 DISALLOW_COPY_AND_ASSIGN(ErrorScreen); 124 DISALLOW_COPY_AND_ASSIGN(ErrorScreen);
124 }; 125 };
125 126
126 } // namespace chromeos 127 } // namespace chromeos
127 128
128 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_H_ 129 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_ERROR_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698