| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/existing_user_controller.h" | 5 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <functional> | 8 #include <functional> |
| 9 #include <map> | 9 #include <map> |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // If there's only new user pod, show the guest session link on it. | 185 // If there's only new user pod, show the guest session link on it. |
| 186 bool show_guest_link = controllers_.size() == 1; | 186 bool show_guest_link = controllers_.size() == 1; |
| 187 for (size_t i = 0; i < controllers_.size(); ++i) { | 187 for (size_t i = 0; i < controllers_.size(); ++i) { |
| 188 (controllers_[i])->Init(static_cast<int>(i), | 188 (controllers_[i])->Init(static_cast<int>(i), |
| 189 static_cast<int>(controllers_.size()), | 189 static_cast<int>(controllers_.size()), |
| 190 show_guest_link); | 190 show_guest_link); |
| 191 } | 191 } |
| 192 | 192 |
| 193 EnableTooltipsIfNeeded(controllers_); | 193 EnableTooltipsIfNeeded(controllers_); |
| 194 | 194 |
| 195 WmMessageListener::instance()->AddObserver(this); | 195 WmMessageListener::GetInstance()->AddObserver(this); |
| 196 | 196 |
| 197 LoginUtils::Get()->PrewarmAuthentication(); | 197 LoginUtils::Get()->PrewarmAuthentication(); |
| 198 if (CrosLibrary::Get()->EnsureLoaded()) | 198 if (CrosLibrary::Get()->EnsureLoaded()) |
| 199 CrosLibrary::Get()->GetLoginLibrary()->EmitLoginPromptReady(); | 199 CrosLibrary::Get()->GetLoginLibrary()->EmitLoginPromptReady(); |
| 200 } | 200 } |
| 201 | 201 |
| 202 void ExistingUserController::OwnBackground( | 202 void ExistingUserController::OwnBackground( |
| 203 views::Widget* background_widget, | 203 views::Widget* background_widget, |
| 204 chromeos::BackgroundView* background_view) { | 204 chromeos::BackgroundView* background_view) { |
| 205 DCHECK(!background_window_); | 205 DCHECK(!background_window_); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 233 background_view_->SetStatusAreaEnabled(enable); | 233 background_view_->SetStatusAreaEnabled(enable); |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 | 236 |
| 237 ExistingUserController::~ExistingUserController() { | 237 ExistingUserController::~ExistingUserController() { |
| 238 ClearErrors(); | 238 ClearErrors(); |
| 239 | 239 |
| 240 if (background_window_) | 240 if (background_window_) |
| 241 background_window_->Close(); | 241 background_window_->Close(); |
| 242 | 242 |
| 243 WmMessageListener::instance()->RemoveObserver(this); | 243 WmMessageListener::GetInstance()->RemoveObserver(this); |
| 244 | 244 |
| 245 STLDeleteElements(&controllers_); | 245 STLDeleteElements(&controllers_); |
| 246 } | 246 } |
| 247 | 247 |
| 248 void ExistingUserController::Delete() { | 248 void ExistingUserController::Delete() { |
| 249 delete_scheduled_instance_ = NULL; | 249 delete_scheduled_instance_ = NULL; |
| 250 delete this; | 250 delete this; |
| 251 } | 251 } |
| 252 | 252 |
| 253 void ExistingUserController::ProcessWmMessage(const WmIpc::Message& message, | 253 void ExistingUserController::ProcessWmMessage(const WmIpc::Message& message, |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 void ExistingUserController::RecoverEncryptedData( | 613 void ExistingUserController::RecoverEncryptedData( |
| 614 const std::string& old_password) { | 614 const std::string& old_password) { |
| 615 login_performer_->RecoverEncryptedData(old_password); | 615 login_performer_->RecoverEncryptedData(old_password); |
| 616 } | 616 } |
| 617 | 617 |
| 618 void ExistingUserController::ResyncEncryptedData() { | 618 void ExistingUserController::ResyncEncryptedData() { |
| 619 login_performer_->ResyncEncryptedData(); | 619 login_performer_->ResyncEncryptedData(); |
| 620 } | 620 } |
| 621 | 621 |
| 622 } // namespace chromeos | 622 } // namespace chromeos |
| OLD | NEW |