| 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/automation/automation_event_observers.h" | 5 #include "chrome/browser/automation/automation_event_observers.h" |
| 6 #include "chrome/browser/browser_process.h" | 6 #include "chrome/browser/browser_process.h" |
| 7 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 7 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
| 8 | 8 |
| 9 using chromeos::ExistingUserController; | 9 using chromeos::ExistingUserController; |
| 10 | 10 |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 // the correct one. | 32 // the correct one. |
| 33 if (automation_) { | 33 if (automation_) { |
| 34 automation_->set_profile( | 34 automation_->set_profile( |
| 35 g_browser_process->profile_manager()->GetLastUsedProfile()); | 35 g_browser_process->profile_manager()->GetLastUsedProfile()); |
| 36 } | 36 } |
| 37 VLOG(1) << "Successfully logged in."; | 37 VLOG(1) << "Successfully logged in."; |
| 38 _NotifyLoginEvent(std::string()); | 38 _NotifyLoginEvent(std::string()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void LoginEventObserver::_NotifyLoginEvent(const std::string& error_string) { | 41 void LoginEventObserver::_NotifyLoginEvent(const std::string& error_string) { |
| 42 DictionaryValue* dict = new DictionaryValue; | 42 base::DictionaryValue* dict = new base::DictionaryValue; |
| 43 dict->SetString("type", "login_event"); | 43 dict->SetString("type", "login_event"); |
| 44 if (error_string.length()) | 44 if (error_string.length()) |
| 45 dict->SetString("error_string", error_string); | 45 dict->SetString("error_string", error_string); |
| 46 NotifyEvent(dict); | 46 NotifyEvent(dict); |
| 47 ExistingUserController* controller = | 47 ExistingUserController* controller = |
| 48 ExistingUserController::current_controller(); | 48 ExistingUserController::current_controller(); |
| 49 if (controller) | 49 if (controller) |
| 50 controller->set_login_status_consumer(NULL); | 50 controller->set_login_status_consumer(NULL); |
| 51 RemoveIfDone(); | 51 RemoveIfDone(); |
| 52 } | 52 } |
| OLD | NEW |