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

Side by Side Diff: trunk/src/chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h

Issue 441143002: Revert 287581 "Allow recommended locales to be set for public se..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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_CHROME_USER_SELECTION_SCREEN_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CHROME_USER_SELECTION_SCREEN_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CHROME_USER_SELECTION_SCREEN_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CHROME_USER_SELECTION_SCREEN_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector>
11 10
12 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
13 #include "base/macros.h" 12 #include "base/macros.h"
14 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
15 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h" 14 #include "chrome/browser/chromeos/login/screens/user_selection_screen.h"
16 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h" 15 #include "chrome/browser/chromeos/policy/device_local_account_policy_service.h"
17 16
18 namespace chromeos { 17 namespace chromeos {
19 18
20 class ChromeUserSelectionScreen 19 class ChromeUserSelectionScreen
(...skipping 11 matching lines...) Expand all
32 // policy::DeviceLocalAccountPolicyService::Observer: 31 // policy::DeviceLocalAccountPolicyService::Observer:
33 virtual void OnPolicyUpdated(const std::string& user_id) OVERRIDE; 32 virtual void OnPolicyUpdated(const std::string& user_id) OVERRIDE;
34 virtual void OnDeviceLocalAccountsChanged() OVERRIDE; 33 virtual void OnDeviceLocalAccountsChanged() OVERRIDE;
35 34
36 private: 35 private:
37 // Check whether the display name set by policy for a public session has 36 // Check whether the display name set by policy for a public session has
38 // changed and if so, notify the UI. 37 // changed and if so, notify the UI.
39 void CheckForPublicSessionDisplayNameChange( 38 void CheckForPublicSessionDisplayNameChange(
40 policy::DeviceLocalAccountPolicyBroker* broker); 39 policy::DeviceLocalAccountPolicyBroker* broker);
41 40
42 // Check whether the list of recommended locales set by policy for a public
43 // session has changed and if so, notify the UI.
44 void CheckForPublicSessionLocalePolicyChange(
45 policy::DeviceLocalAccountPolicyBroker* broker);
46
47 // Notify the UI that the display name for a public session has changed, 41 // Notify the UI that the display name for a public session has changed,
48 // taking the display name from the |User| owned by |UserManager|. 42 // taking the display name from the |User| owned by |UserManager|.
49 void SetPublicSessionDisplayName(const std::string& user_id); 43 void SetPublicSessionDisplayName(const std::string& user_id);
50 44
51 // Send an updated list of locales for a public session to the UI, consisting
52 // of the |recommended_locales| followed by all other available locales.
53 void SetPublicSessionLocales(
54 const std::string& user_id,
55 const std::vector<std::string>* recommended_locales);
56
57 bool handler_initialized_; 45 bool handler_initialized_;
58 46
59 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_; 47 policy::DeviceLocalAccountPolicyService* device_local_account_policy_service_;
60 48
61 // Map from public session user IDs to their display names set by policy. 49 // Map from public session user IDs to their display names set by policy.
62 typedef std::map<std::string, std::string> DisplayNamesMap; 50 typedef std::map<std::string, std::string> DisplayNamesMap;
63 DisplayNamesMap public_session_display_names_; 51 DisplayNamesMap public_session_display_names_;
64 52
65 base::WeakPtrFactory<ChromeUserSelectionScreen> weak_factory_; 53 base::WeakPtrFactory<ChromeUserSelectionScreen> weak_factory_;
66 54
67 DISALLOW_COPY_AND_ASSIGN(ChromeUserSelectionScreen); 55 DISALLOW_COPY_AND_ASSIGN(ChromeUserSelectionScreen);
68 }; 56 };
69 57
70 } // namespace chromeos 58 } // namespace chromeos
71 59
72 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CHROME_USER_SELECTION_SCREEN_H_ 60 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SCREENS_CHROME_USER_SELECTION_SCREEN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698