| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/lock/screen_locker_tester.h" | 5 #include "chrome/browser/chromeos/login/lock/screen_locker_tester.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 ScreenLockerTester::~ScreenLockerTester() { | 195 ScreenLockerTester::~ScreenLockerTester() { |
| 196 } | 196 } |
| 197 | 197 |
| 198 bool ScreenLockerTester::IsLocked() { | 198 bool ScreenLockerTester::IsLocked() { |
| 199 return ScreenLocker::screen_locker_ && | 199 return ScreenLocker::screen_locker_ && |
| 200 ScreenLocker::screen_locker_->locked_; | 200 ScreenLocker::screen_locker_->locked_; |
| 201 } | 201 } |
| 202 | 202 |
| 203 void ScreenLockerTester::InjectMockAuthenticator( | 203 void ScreenLockerTester::InjectMockAuthenticator( |
| 204 const std::string& user, const std::string& password) { | 204 const UserContext& user_context) { |
| 205 DCHECK(ScreenLocker::screen_locker_); | 205 DCHECK(ScreenLocker::screen_locker_); |
| 206 ScreenLocker::screen_locker_->SetAuthenticator( | 206 ScreenLocker::screen_locker_->SetAuthenticator( |
| 207 new MockAuthenticator(ScreenLocker::screen_locker_, user, password)); | 207 new MockAuthenticator(ScreenLocker::screen_locker_, user_context)); |
| 208 } | 208 } |
| 209 | 209 |
| 210 } // namespace test | 210 } // namespace test |
| 211 | 211 |
| 212 test::ScreenLockerTester* ScreenLocker::GetTester() { | 212 test::ScreenLockerTester* ScreenLocker::GetTester() { |
| 213 return new test::WebUIScreenLockerTester(); | 213 return new test::WebUIScreenLockerTester(); |
| 214 } | 214 } |
| 215 | 215 |
| 216 } // namespace chromeos | 216 } // namespace chromeos |
| OLD | NEW |