OLD | NEW |
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 "base/bind.h" |
| 6 #include "base/message_loop.h" |
5 #include "chrome/browser/chromeos/login/user_flow.h" | 7 #include "chrome/browser/chromeos/login/user_flow.h" |
| 8 #include "chrome/browser/chromeos/login/user_manager.h" |
6 | 9 |
7 namespace chromeos { | 10 namespace chromeos { |
8 | 11 |
| 12 namespace { |
| 13 |
| 14 void UnregisterFlow(const std::string& user_id) { |
| 15 UserManager::Get()->ResetUserFlow(user_id); |
| 16 } |
| 17 |
| 18 } // namespace |
| 19 |
9 UserFlow::~UserFlow() {} | 20 UserFlow::~UserFlow() {} |
10 | 21 |
11 DefaultUserFlow::~DefaultUserFlow() {} | 22 DefaultUserFlow::~DefaultUserFlow() {} |
12 | 23 |
13 bool DefaultUserFlow::ShouldLaunchBrowser() { | 24 bool DefaultUserFlow::ShouldLaunchBrowser() { |
14 return true; | 25 return true; |
15 } | 26 } |
16 | 27 |
17 bool DefaultUserFlow::ShouldSkipPostLoginScreens() { | 28 bool DefaultUserFlow::ShouldSkipPostLoginScreens() { |
18 return false; | 29 return false; |
19 } | 30 } |
20 | 31 |
21 bool DefaultUserFlow::HandleLoginFailure(const LoginFailure& failure, | 32 bool DefaultUserFlow::HandleLoginFailure(const LoginFailure& failure, |
22 LoginDisplayHost* host) { | 33 LoginDisplayHost* host) { |
23 return false; | 34 return false; |
24 } | 35 } |
25 | 36 |
26 bool DefaultUserFlow::HandlePasswordChangeDetected(LoginDisplayHost* host) { | 37 bool DefaultUserFlow::HandlePasswordChangeDetected(LoginDisplayHost* host) { |
27 return false; | 38 return false; |
28 } | 39 } |
29 | 40 |
30 void DefaultUserFlow::LaunchExtraSteps(LoginDisplayHost* host) { | 41 void DefaultUserFlow::LaunchExtraSteps(Profile* profile, |
| 42 LoginDisplayHost* host) { |
| 43 } |
| 44 |
| 45 ExtendedUserFlow::ExtendedUserFlow(const std::string& user_id) |
| 46 : user_id_(user_id) { |
| 47 } |
| 48 |
| 49 ExtendedUserFlow::~ExtendedUserFlow() { |
| 50 } |
| 51 |
| 52 void ExtendedUserFlow::UnregisterFlowSoon() { |
| 53 std::string id_copy(user_id()); |
| 54 MessageLoop::current()->PostTask(FROM_HERE, |
| 55 base::Bind(&UnregisterFlow, |
| 56 id_copy)); |
31 } | 57 } |
32 | 58 |
33 } // namespace chromeos | 59 } // namespace chromeos |
OLD | NEW |