Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 10388107: [chromeos] Fix Logout automation when no browser windows are present. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/test/functional/chromeos_login.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/browser/automation/testing_automation_provider.cc ('k') | chrome/test/functional/chromeos_login.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698