| 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 DefaultUserFlow::~DefaultUserFlow() {} | 25 DefaultUserFlow::~DefaultUserFlow() {} |
| 26 | 26 |
| 27 void DefaultUserFlow::AppendAdditionalCommandLineSwitches() { |
| 28 } |
| 29 |
| 27 bool DefaultUserFlow::CanLockScreen() { | 30 bool DefaultUserFlow::CanLockScreen() { |
| 28 return true; | 31 return true; |
| 29 } | 32 } |
| 30 | 33 |
| 31 bool DefaultUserFlow::ShouldShowSettings() { | 34 bool DefaultUserFlow::ShouldShowSettings() { |
| 32 return true; | 35 return true; |
| 33 } | 36 } |
| 34 | 37 |
| 35 bool DefaultUserFlow::ShouldLaunchBrowser() { | 38 bool DefaultUserFlow::ShouldLaunchBrowser() { |
| 36 return true; | 39 return true; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 61 void DefaultUserFlow::LaunchExtraSteps(Profile* profile) { | 64 void DefaultUserFlow::LaunchExtraSteps(Profile* profile) { |
| 62 } | 65 } |
| 63 | 66 |
| 64 ExtendedUserFlow::ExtendedUserFlow(const std::string& user_id) | 67 ExtendedUserFlow::ExtendedUserFlow(const std::string& user_id) |
| 65 : user_id_(user_id) { | 68 : user_id_(user_id) { |
| 66 } | 69 } |
| 67 | 70 |
| 68 ExtendedUserFlow::~ExtendedUserFlow() { | 71 ExtendedUserFlow::~ExtendedUserFlow() { |
| 69 } | 72 } |
| 70 | 73 |
| 74 void ExtendedUserFlow::AppendAdditionalCommandLineSwitches() { |
| 75 } |
| 76 |
| 71 bool ExtendedUserFlow::ShouldShowSettings() { | 77 bool ExtendedUserFlow::ShouldShowSettings() { |
| 72 return true; | 78 return true; |
| 73 } | 79 } |
| 74 | 80 |
| 81 void ExtendedUserFlow::HandleOAuthTokenStatusChange( |
| 82 user_manager::User::OAuthTokenStatus status) { |
| 83 } |
| 84 |
| 75 void ExtendedUserFlow::UnregisterFlowSoon() { | 85 void ExtendedUserFlow::UnregisterFlowSoon() { |
| 76 std::string id_copy(user_id()); | 86 std::string id_copy(user_id()); |
| 77 base::MessageLoop::current()->PostTask(FROM_HERE, | 87 base::MessageLoop::current()->PostTask(FROM_HERE, |
| 78 base::Bind(&UnregisterFlow, | 88 base::Bind(&UnregisterFlow, |
| 79 id_copy)); | 89 id_copy)); |
| 80 } | 90 } |
| 81 | 91 |
| 82 } // namespace chromeos | 92 } // namespace chromeos |
| OLD | NEW |