Index: chrome/browser/automation/testing_automation_provider_chromeos.cc |
diff --git a/chrome/browser/automation/testing_automation_provider_chromeos.cc b/chrome/browser/automation/testing_automation_provider_chromeos.cc |
index 960da57c5163aafc153b8060a29c85c28f8df626..b33db37194cd272b3b2cd931006d744aae23b537 100644 |
--- a/chrome/browser/automation/testing_automation_provider_chromeos.cc |
+++ b/chrome/browser/automation/testing_automation_provider_chromeos.cc |
@@ -4,6 +4,8 @@ |
#include "chrome/browser/automation/testing_automation_provider.h" |
+#include "ash/shell.h" |
+#include "ash/system/tray/system_tray_delegate.h" |
#include "base/command_line.h" |
#include "base/i18n/time_formatting.h" |
#include "base/stringprintf.h" |
@@ -298,6 +300,16 @@ void TestingAutomationProvider::AddLoginEventObserver( |
reply.SendSuccess(&return_value); |
} |
+void TestingAutomationProvider::SignOut(DictionaryValue* args, |
+ IPC::Message* reply_message) { |
+ ash::Shell::GetInstance()->tray_delegate()->SignOut(); |
+ // Sign out has the side effect of restarting the session_manager |
+ // and chrome, thereby severing the automation channel, so it's |
+ // not really necessary to send a reply back. The next line is |
+ // for consistency with other methods. |
+ AutomationJSONReply(this, reply_message).SendSuccess(NULL); |
+} |
+ |
void TestingAutomationProvider::LockScreen(DictionaryValue* args, |
IPC::Message* reply_message) { |
new ScreenLockUnlockObserver(this, reply_message, true); |