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" | 5 #include "base/bind.h" |
6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
7 #include "chrome/browser/chromeos/login/user_flow.h" | 7 #include "chrome/browser/chromeos/login/user_flow.h" |
8 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" | 8 #include "chrome/browser/chromeos/login/users/chrome_user_manager.h" |
9 | 9 |
10 namespace chromeos { | 10 namespace chromeos { |
11 | 11 |
12 namespace { | 12 namespace { |
13 | 13 |
14 void UnregisterFlow(const std::string& user_id) { | 14 void UnregisterFlow(const std::string& user_id) { |
15 ChromeUserManager::Get()->ResetUserFlow(user_id); | 15 ChromeUserManager::Get()->ResetUserFlow(user_id); |
16 } | 16 } |
17 | 17 |
18 } // namespace | 18 } // namespace |
19 | 19 |
20 | 20 |
21 UserFlow::UserFlow() : host_(NULL) {} | 21 UserFlow::UserFlow() : host_(NULL) {} |
22 | 22 |
23 UserFlow::~UserFlow() {} | 23 UserFlow::~UserFlow() {} |
24 | 24 |
| 25 void UserFlow::SetHost(LoginDisplayHost* host) { |
| 26 // TODO(antrim): remove this output once crash reason is found. |
| 27 LOG(ERROR) << "Flow " << this << " got host " << host; |
| 28 host_ = host; |
| 29 } |
| 30 |
25 DefaultUserFlow::~DefaultUserFlow() {} | 31 DefaultUserFlow::~DefaultUserFlow() {} |
26 | 32 |
27 void DefaultUserFlow::AppendAdditionalCommandLineSwitches() { | 33 void DefaultUserFlow::AppendAdditionalCommandLineSwitches() { |
28 } | 34 } |
29 | 35 |
30 bool DefaultUserFlow::CanLockScreen() { | 36 bool DefaultUserFlow::CanLockScreen() { |
31 return true; | 37 return true; |
32 } | 38 } |
33 | 39 |
34 bool DefaultUserFlow::ShouldShowSettings() { | 40 bool DefaultUserFlow::ShouldShowSettings() { |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 89 } |
84 | 90 |
85 void ExtendedUserFlow::UnregisterFlowSoon() { | 91 void ExtendedUserFlow::UnregisterFlowSoon() { |
86 std::string id_copy(user_id()); | 92 std::string id_copy(user_id()); |
87 base::MessageLoop::current()->PostTask(FROM_HERE, | 93 base::MessageLoop::current()->PostTask(FROM_HERE, |
88 base::Bind(&UnregisterFlow, | 94 base::Bind(&UnregisterFlow, |
89 id_copy)); | 95 id_copy)); |
90 } | 96 } |
91 | 97 |
92 } // namespace chromeos | 98 } // namespace chromeos |
OLD | NEW |