| OLD | NEW |
| 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 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/hash_tables.h" | 10 #include "base/hash_tables.h" |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 | 767 |
| 768 ListValue users_list; | 768 ListValue users_list; |
| 769 const UserList& users = delegate_->GetUsers(); | 769 const UserList& users = delegate_->GetUsers(); |
| 770 | 770 |
| 771 bool single_user = users.size() == 1; | 771 bool single_user = users.size() == 1; |
| 772 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { | 772 for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) { |
| 773 const std::string& email = (*it)->email(); | 773 const std::string& email = (*it)->email(); |
| 774 std::string owner; | 774 std::string owner; |
| 775 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); | 775 chromeos::CrosSettings::Get()->GetString(chromeos::kDeviceOwner, &owner); |
| 776 bool is_owner = (email == owner); | 776 bool is_owner = (email == owner); |
| 777 bool signed_in = UserManager::Get()->user_is_logged_in() && | 777 bool signed_in = UserManager::Get()->IsUserLoggedIn() && |
| 778 email == UserManager::Get()->logged_in_user().email(); | 778 email == UserManager::Get()->GetLoggedInUser().email(); |
| 779 | 779 |
| 780 if (non_owner_count < max_non_owner_users || is_owner) { | 780 if (non_owner_count < max_non_owner_users || is_owner) { |
| 781 DictionaryValue* user_dict = new DictionaryValue(); | 781 DictionaryValue* user_dict = new DictionaryValue(); |
| 782 user_dict->SetString(kKeyUsername, email); | 782 user_dict->SetString(kKeyUsername, email); |
| 783 user_dict->SetString(kKeyEmailAddress, (*it)->display_email()); | 783 user_dict->SetString(kKeyEmailAddress, (*it)->display_email()); |
| 784 user_dict->SetString(kKeyDisplayName, (*it)->GetDisplayName()); | 784 user_dict->SetString(kKeyDisplayName, (*it)->GetDisplayName()); |
| 785 if ((*it)->NeedsNameTooltip()) | 785 if ((*it)->NeedsNameTooltip()) |
| 786 user_dict->SetString(kKeyNameTooltip, (*it)->GetNameTooltip()); | 786 user_dict->SetString(kKeyNameTooltip, (*it)->GetNameTooltip()); |
| 787 user_dict->SetInteger(kKeyOauthTokenStatus, (*it)->oauth_token_status()); | 787 user_dict->SetInteger(kKeyOauthTokenStatus, (*it)->oauth_token_status()); |
| 788 user_dict->SetBoolean(kKeySignedIn, signed_in); | 788 user_dict->SetBoolean(kKeySignedIn, signed_in); |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 | 942 |
| 943 cookie_remover_ = new BrowsingDataRemover( | 943 cookie_remover_ = new BrowsingDataRemover( |
| 944 Profile::FromWebUI(web_ui()), | 944 Profile::FromWebUI(web_ui()), |
| 945 BrowsingDataRemover::EVERYTHING, | 945 BrowsingDataRemover::EVERYTHING, |
| 946 base::Time()); | 946 base::Time()); |
| 947 cookie_remover_->AddObserver(this); | 947 cookie_remover_->AddObserver(this); |
| 948 cookie_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA); | 948 cookie_remover_->Remove(BrowsingDataRemover::REMOVE_SITE_DATA); |
| 949 } | 949 } |
| 950 | 950 |
| 951 } // namespace chromeos | 951 } // namespace chromeos |
| OLD | NEW |