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

Side by Side Diff: chrome/browser/chromeos/login/screens/update_screen.h

Issue 2889383002: Revert of Make Hands-Off Zero-Touch Enrollment compatibile with tests (Closed)
Patch Set: Created 3 years, 7 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_UPDATE_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Skip update UI, usually used only in debug builds/tests. 73 // Skip update UI, usually used only in debug builds/tests.
74 void CancelUpdate(); 74 void CancelUpdate();
75 75
76 base::OneShotTimer& GetErrorMessageTimerForTesting(); 76 base::OneShotTimer& GetErrorMessageTimerForTesting();
77 77
78 private: 78 private:
79 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestBasic); 79 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestBasic);
80 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestUpdateAvailable); 80 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestUpdateAvailable);
81 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestAPReselection); 81 FRIEND_TEST_ALL_PREFIXES(UpdateScreenTest, TestAPReselection);
82 friend class UpdateScreenUnitTest;
83 82
84 enum class State { 83 enum class State {
85 STATE_IDLE = 0, 84 STATE_IDLE = 0,
86 STATE_FIRST_PORTAL_CHECK, 85 STATE_FIRST_PORTAL_CHECK,
87 STATE_UPDATE, 86 STATE_UPDATE,
88 STATE_ERROR 87 STATE_ERROR
89 }; 88 };
90 89
91 // BaseScreen: 90 // BaseScreen:
92 void Show() override; 91 void Show() override;
(...skipping 26 matching lines...) Expand all
119 void HideErrorMessage(); 118 void HideErrorMessage();
120 void UpdateErrorMessage( 119 void UpdateErrorMessage(
121 const NetworkState* network, 120 const NetworkState* network,
122 const NetworkPortalDetector::CaptivePortalStatus status); 121 const NetworkPortalDetector::CaptivePortalStatus status);
123 122
124 void DelayErrorMessage(); 123 void DelayErrorMessage();
125 124
126 // The user requested an attempt to connect to the network should be made. 125 // The user requested an attempt to connect to the network should be made.
127 void OnConnectRequested(); 126 void OnConnectRequested();
128 127
129 // Records the fact that we performed an update check but do not yet
130 // know if this update check is going to result in an update.
131 void RecordUpdateCheckWithNoUpdateYet();
132
133 // When an update is found, this is called to clear the time of update check
134 // which had saved when we did not yet know whether it would result in an
135 // update.
136 void ClearUpdateCheckNoUpdateTime();
137
138 // Returns true if we should check for an update.
139 bool ShouldCheckForUpdate();
140
141 // Timer for the interval to wait for the reboot. 128 // Timer for the interval to wait for the reboot.
142 // If reboot didn't happen - ask user to reboot manually. 129 // If reboot didn't happen - ask user to reboot manually.
143 base::OneShotTimer reboot_timer_; 130 base::OneShotTimer reboot_timer_;
144 131
145 // Returns a static InstanceSet. 132 // Returns a static InstanceSet.
146 // TODO(jdufault): There should only ever be one instance of this class. 133 // TODO(jdufault): There should only ever be one instance of this class.
147 // Remove support for supporting multiple instances. See crbug.com/672142. 134 // Remove support for supporting multiple instances. See crbug.com/672142.
148 typedef std::set<UpdateScreen*> InstanceSet; 135 typedef std::set<UpdateScreen*> InstanceSet;
149 static InstanceSet& GetInstanceSet(); 136 static InstanceSet& GetInstanceSet();
150 137
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 ErrorScreen::ConnectRequestCallbackSubscription connect_request_subscription_; 189 ErrorScreen::ConnectRequestCallbackSubscription connect_request_subscription_;
203 190
204 base::WeakPtrFactory<UpdateScreen> weak_factory_; 191 base::WeakPtrFactory<UpdateScreen> weak_factory_;
205 192
206 DISALLOW_COPY_AND_ASSIGN(UpdateScreen); 193 DISALLOW_COPY_AND_ASSIGN(UpdateScreen);
207 }; 194 };
208 195
209 } // namespace chromeos 196 } // namespace chromeos
210 197
211 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_ 198 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_UPDATE_SCREEN_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/screens/screen_exit_code.h ('k') | chrome/browser/chromeos/login/screens/update_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698