Cast: Stop logging kVideoFrameSentToEncoder and rename a couple events.
[chromium-blink-merge.git] / chrome / browser / chromeos / login / user_flow.cc
blob1b414ebe95d4881dc5028be7b6b5570f75a7fc33
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
3 // found in the LICENSE file.
5 #include "base/bind.h"
6 #include "base/message_loop/message_loop.h"
7 #include "chrome/browser/chromeos/login/user_flow.h"
8 #include "chrome/browser/chromeos/login/user_manager.h"
10 namespace chromeos {
12 namespace {
14 void UnregisterFlow(const std::string& user_id) {
15 UserManager::Get()->ResetUserFlow(user_id);
18 } // namespace
21 UserFlow::UserFlow() : host_(NULL) {}
23 UserFlow::~UserFlow() {}
25 DefaultUserFlow::~DefaultUserFlow() {}
27 bool DefaultUserFlow::CanLockScreen() {
28 return true;
31 bool DefaultUserFlow::ShouldShowSettings() {
32 return true;
35 bool DefaultUserFlow::ShouldLaunchBrowser() {
36 return true;
39 bool DefaultUserFlow::ShouldSkipPostLoginScreens() {
40 return false;
43 bool DefaultUserFlow::HandleLoginFailure(const LoginFailure& failure) {
44 return false;
47 void DefaultUserFlow::HandleLoginSuccess(const UserContext& context) {}
49 bool DefaultUserFlow::HandlePasswordChangeDetected() {
50 return false;
53 void DefaultUserFlow::HandleOAuthTokenStatusChange(
54 User::OAuthTokenStatus status) {
57 void DefaultUserFlow::LaunchExtraSteps(Profile* profile) {
60 ExtendedUserFlow::ExtendedUserFlow(const std::string& user_id)
61 : user_id_(user_id) {
64 ExtendedUserFlow::~ExtendedUserFlow() {
67 bool ExtendedUserFlow::ShouldShowSettings() {
68 return true;
71 void ExtendedUserFlow::UnregisterFlowSoon() {
72 std::string id_copy(user_id());
73 base::MessageLoop::current()->PostTask(FROM_HERE,
74 base::Bind(&UnregisterFlow,
75 id_copy));
78 } // namespace chromeos