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

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

Issue 1066843002: Run OAuth token handle check upon user pod selction. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "base/values.h" 14 #include "base/values.h"
15 #include "chrome/browser/chromeos/login/signin/token_handle_util.h"
15 #include "chrome/browser/chromeos/login/ui/login_display.h" 16 #include "chrome/browser/chromeos/login/ui/login_display.h"
16 #include "chrome/browser/chromeos/login/ui/models/user_board_model.h" 17 #include "chrome/browser/chromeos/login/ui/models/user_board_model.h"
17 #include "chrome/browser/signin/screenlock_bridge.h" 18 #include "chrome/browser/signin/screenlock_bridge.h"
18 #include "components/user_manager/user.h" 19 #include "components/user_manager/user.h"
20 #include "components/user_manager/user_id.h"
19 #include "ui/base/user_activity/user_activity_observer.h" 21 #include "ui/base/user_activity/user_activity_observer.h"
20 22
21 class EasyUnlockService; 23 class EasyUnlockService;
22 24
23 namespace chromeos { 25 namespace chromeos {
24 26
25 class LoginDisplayWebUIHandler; 27 class LoginDisplayWebUIHandler;
26 class UserBoardView; 28 class UserBoardView;
27 29
28 // This class represents User Selection screen: user pod-based login screen. 30 // This class represents User Selection screen: user pod-based login screen.
(...skipping 16 matching lines...) Expand all
45 47
46 virtual void Init(const user_manager::UserList& users, bool show_guest); 48 virtual void Init(const user_manager::UserList& users, bool show_guest);
47 const user_manager::UserList& GetUsers() const; 49 const user_manager::UserList& GetUsers() const;
48 void OnUserImageChanged(const user_manager::User& user); 50 void OnUserImageChanged(const user_manager::User& user);
49 void OnBeforeUserRemoved(const std::string& username); 51 void OnBeforeUserRemoved(const std::string& username);
50 void OnUserRemoved(const std::string& username); 52 void OnUserRemoved(const std::string& username);
51 53
52 void OnPasswordClearTimerExpired(); 54 void OnPasswordClearTimerExpired();
53 55
54 void HandleGetUsers(); 56 void HandleGetUsers();
57 void CheckUserStatus(const std::string& user_id);
55 58
56 // ui::UserActivityDetector implementation: 59 // ui::UserActivityDetector implementation:
57 void OnUserActivity(const ui::Event* event) override; 60 void OnUserActivity(const ui::Event* event) override;
58 61
59 void InitEasyUnlock(); 62 void InitEasyUnlock();
60 63
61 // ScreenlockBridge::LockHandler implementation: 64 // ScreenlockBridge::LockHandler implementation:
62 void ShowBannerMessage(const base::string16& message) override; 65 void ShowBannerMessage(const base::string16& message) override;
63 void ShowUserPodCustomIcon( 66 void ShowUserPodCustomIcon(
64 const std::string& user_email, 67 const std::string& user_email,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 114
112 // Map from public session user IDs to recommended locales set by policy. 115 // Map from public session user IDs to recommended locales set by policy.
113 typedef std::map<std::string, std::vector<std::string> > 116 typedef std::map<std::string, std::vector<std::string> >
114 PublicSessionRecommendedLocaleMap; 117 PublicSessionRecommendedLocaleMap;
115 PublicSessionRecommendedLocaleMap public_session_recommended_locales_; 118 PublicSessionRecommendedLocaleMap public_session_recommended_locales_;
116 119
117 private: 120 private:
118 EasyUnlockService* GetEasyUnlockServiceForUser( 121 EasyUnlockService* GetEasyUnlockServiceForUser(
119 const std::string& user_id) const; 122 const std::string& user_id) const;
120 123
124 void OnUserStatusChecked(const user_manager::UserID& user_id,
125 TokenHandleUtil::TokenHandleStatus status);
126
121 // Whether to show guest login. 127 // Whether to show guest login.
122 bool show_guest_; 128 bool show_guest_;
123 129
124 // Purpose of the screen (see constants in OobeUI). 130 // Purpose of the screen (see constants in OobeUI).
125 const std::string display_type_; 131 const std::string display_type_;
126 132
127 // Set of Users that are visible. 133 // Set of Users that are visible.
128 user_manager::UserList users_; 134 user_manager::UserList users_;
129 135
130 // Map of usernames to their current authentication type. If a user is not 136 // Map of usernames to their current authentication type. If a user is not
131 // contained in the map, it is using the default authentication type. 137 // contained in the map, it is using the default authentication type.
132 std::map<std::string, ScreenlockBridge::LockHandler::AuthType> 138 std::map<std::string, ScreenlockBridge::LockHandler::AuthType>
133 user_auth_type_map_; 139 user_auth_type_map_;
134 140
135 // Timer for measuring idle state duration before password clear. 141 // Timer for measuring idle state duration before password clear.
136 base::OneShotTimer<UserSelectionScreen> password_clear_timer_; 142 base::OneShotTimer<UserSelectionScreen> password_clear_timer_;
137 143
144 // Token handler util for checking user OAuth token status.
145 scoped_ptr<TokenHandleUtil> token_handle_util_;
146
147 base::WeakPtrFactory<UserSelectionScreen> weak_factory_;
148
138 DISALLOW_COPY_AND_ASSIGN(UserSelectionScreen); 149 DISALLOW_COPY_AND_ASSIGN(UserSelectionScreen);
139 }; 150 };
140 151
141 } // namespace chromeos 152 } // namespace chromeos
142 153
143 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_ 154 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_USER_SELECTION_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698