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

Side by Side Diff: chrome/browser/automation/testing_automation_provider_chromeos.cc

Issue 16278003: Made possible to lock and unlock with several logged in users. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_locker.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/testing_automation_provider.h" 5 #include "chrome/browser/automation/testing_automation_provider.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_delegate.h" 8 #include "ash/shell_delegate.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 chromeos::ScreenLocker* screen_locker = 467 chromeos::ScreenLocker* screen_locker =
468 chromeos::ScreenLocker::default_screen_locker(); 468 chromeos::ScreenLocker::default_screen_locker();
469 if (!screen_locker) { 469 if (!screen_locker) {
470 AutomationJSONReply(this, reply_message).SendError( 470 AutomationJSONReply(this, reply_message).SendError(
471 "No default screen locker. Are you sure the screen is locked?"); 471 "No default screen locker. Are you sure the screen is locked?");
472 return; 472 return;
473 } 473 }
474 474
475 new ScreenUnlockObserver(this, reply_message); 475 new ScreenUnlockObserver(this, reply_message);
476 screen_locker->Authenticate(ASCIIToUTF16(password)); 476 screen_locker->AuthenticateByPassword(password);
477 } 477 }
478 478
479 // Signing out could have undesirable side effects: session_manager is 479 // Signing out could have undesirable side effects: session_manager is
480 // killed, so its children, including chrome and the window manager, will 480 // killed, so its children, including chrome and the window manager, will
481 // also be killed. Anything owned by chronos will probably be killed. 481 // also be killed. Anything owned by chronos will probably be killed.
482 void TestingAutomationProvider::SignoutInScreenLocker( 482 void TestingAutomationProvider::SignoutInScreenLocker(
483 DictionaryValue* args, IPC::Message* reply_message) { 483 DictionaryValue* args, IPC::Message* reply_message) {
484 AutomationJSONReply reply(this, reply_message); 484 AutomationJSONReply reply(this, reply_message);
485 chromeos::ScreenLocker* screen_locker = 485 chromeos::ScreenLocker* screen_locker =
486 chromeos::ScreenLocker::default_screen_locker(); 486 chromeos::ScreenLocker::default_screen_locker();
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 1267 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
1268 AddObserver(power_manager_observer_); 1268 AddObserver(power_manager_observer_);
1269 } 1269 }
1270 1270
1271 void TestingAutomationProvider::RemoveChromeosObservers() { 1271 void TestingAutomationProvider::RemoveChromeosObservers() {
1272 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> 1272 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->
1273 RemoveObserver(power_manager_observer_); 1273 RemoveObserver(power_manager_observer_);
1274 delete power_manager_observer_; 1274 delete power_manager_observer_;
1275 power_manager_observer_ = NULL; 1275 power_manager_observer_ = NULL;
1276 } 1276 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/login/screen_locker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698