| OLD | NEW |
| 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 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" | 5 #include "chrome/browser/chromeos/login/screens/chrome_user_selection_screen.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 | 37 |
| 38 ChromeUserSelectionScreen::~ChromeUserSelectionScreen() { | 38 ChromeUserSelectionScreen::~ChromeUserSelectionScreen() { |
| 39 device_local_account_policy_service_->RemoveObserver(this); | 39 device_local_account_policy_service_->RemoveObserver(this); |
| 40 } | 40 } |
| 41 | 41 |
| 42 void ChromeUserSelectionScreen::Init(const user_manager::UserList& users, | 42 void ChromeUserSelectionScreen::Init(const user_manager::UserList& users, |
| 43 bool show_guest) { | 43 bool show_guest) { |
| 44 UserSelectionScreen::Init(users, show_guest); | 44 UserSelectionScreen::Init(users, show_guest); |
| 45 | 45 |
| 46 // Retrieve the current policy for |users_|. | 46 // Retrieve the current policy for all users. |
| 47 for (user_manager::UserList::const_iterator it = users_.begin(); | 47 for (user_manager::UserList::const_iterator it = users.begin(); |
| 48 it != users_.end(); ++it) { | 48 it != users.end(); ++it) { |
| 49 if ((*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT) | 49 if ((*it)->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT) |
| 50 OnPolicyUpdated((*it)->GetUserID()); | 50 OnPolicyUpdated((*it)->GetUserID()); |
| 51 } | 51 } |
| 52 } | 52 } |
| 53 | 53 |
| 54 void ChromeUserSelectionScreen::SendUserList() { | 54 void ChromeUserSelectionScreen::SendUserList() { |
| 55 UserSelectionScreen::SendUserList(); | 55 UserSelectionScreen::SendUserList(); |
| 56 handler_initialized_ = true; | 56 handler_initialized_ = true; |
| 57 } | 57 } |
| 58 | 58 |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 const bool two_or_more_recommended_locales = recommended_locales->size() >= 2; | 184 const bool two_or_more_recommended_locales = recommended_locales->size() >= 2; |
| 185 | 185 |
| 186 // Notify the UI. | 186 // Notify the UI. |
| 187 handler_->SetPublicSessionLocales(user_id, | 187 handler_->SetPublicSessionLocales(user_id, |
| 188 locales.Pass(), | 188 locales.Pass(), |
| 189 default_locale, | 189 default_locale, |
| 190 two_or_more_recommended_locales); | 190 two_or_more_recommended_locales); |
| 191 } | 191 } |
| 192 | 192 |
| 193 } // namespace chromeos | 193 } // namespace chromeos |
| OLD | NEW |