OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/values.h" | 8 #include "base/values.h" |
9 #include "chrome/browser/chromeos/login/existing_user_controller.h" | 9 #include "chrome/browser/chromeos/login/existing_user_controller.h" |
10 #include "chrome/browser/chromeos/login/ui/mock_login_display.h" | 10 #include "chrome/browser/chromeos/login/ui/mock_login_display.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 void SetAutoLoginSettings(const std::string& account_id, int delay) { | 97 void SetAutoLoginSettings(const std::string& account_id, int delay) { |
98 CrosSettings::Get()->SetString( | 98 CrosSettings::Get()->SetString( |
99 kAccountsPrefDeviceLocalAccountAutoLoginId, | 99 kAccountsPrefDeviceLocalAccountAutoLoginId, |
100 account_id); | 100 account_id); |
101 CrosSettings::Get()->SetInteger( | 101 CrosSettings::Get()->SetInteger( |
102 kAccountsPrefDeviceLocalAccountAutoLoginDelay, | 102 kAccountsPrefDeviceLocalAccountAutoLoginDelay, |
103 delay); | 103 delay); |
104 } | 104 } |
105 | 105 |
106 // ExistingUserController private member accessors. | 106 // ExistingUserController private member accessors. |
107 base::OneShotTimer<ExistingUserController>* auto_login_timer() { | 107 base::OneShotTimer* auto_login_timer() { |
108 return existing_user_controller()->auto_login_timer_.get(); | 108 return existing_user_controller()->auto_login_timer_.get(); |
109 } | 109 } |
110 | 110 |
111 const std::string& auto_login_username() const { | 111 const std::string& auto_login_username() const { |
112 return existing_user_controller()->public_session_auto_login_username_; | 112 return existing_user_controller()->public_session_auto_login_username_; |
113 } | 113 } |
114 void set_auto_login_username(const std::string& username) { | 114 void set_auto_login_username(const std::string& username) { |
115 existing_user_controller()->public_session_auto_login_username_ = username; | 115 existing_user_controller()->public_session_auto_login_username_ = username; |
116 } | 116 } |
117 | 117 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 ConfigureAutoLogin(); | 268 ConfigureAutoLogin(); |
269 ASSERT_TRUE(auto_login_timer()); | 269 ASSERT_TRUE(auto_login_timer()); |
270 EXPECT_FALSE(auto_login_timer()->IsRunning()); | 270 EXPECT_FALSE(auto_login_timer()->IsRunning()); |
271 EXPECT_EQ(auto_login_timer()->GetCurrentDelay().InMilliseconds(), | 271 EXPECT_EQ(auto_login_timer()->GetCurrentDelay().InMilliseconds(), |
272 kAutoLoginDelay2); | 272 kAutoLoginDelay2); |
273 EXPECT_EQ(auto_login_username(), ""); | 273 EXPECT_EQ(auto_login_username(), ""); |
274 EXPECT_EQ(auto_login_delay(), kAutoLoginDelay2); | 274 EXPECT_EQ(auto_login_delay(), kAutoLoginDelay2); |
275 } | 275 } |
276 | 276 |
277 } // namespace chromeos | 277 } // namespace chromeos |
OLD | NEW |