Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: chrome/browser/chromeos/login/supervised/supervised_user_creation_flow.cc

Issue 398753004: [cros] Move User class to user_manager component. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/login/supervised/supervised_user_creation_flow .h" 5 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_flow .h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.h" 9 #include "chrome/browser/chromeos/login/supervised/supervised_user_creation_scre en.h"
10 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" 10 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 bool SupervisedUserCreationFlow::ShouldLaunchBrowser() { 45 bool SupervisedUserCreationFlow::ShouldLaunchBrowser() {
46 return false; 46 return false;
47 } 47 }
48 48
49 bool SupervisedUserCreationFlow::ShouldSkipPostLoginScreens() { 49 bool SupervisedUserCreationFlow::ShouldSkipPostLoginScreens() {
50 return true; 50 return true;
51 } 51 }
52 52
53 void SupervisedUserCreationFlow::HandleOAuthTokenStatusChange( 53 void SupervisedUserCreationFlow::HandleOAuthTokenStatusChange(
54 User::OAuthTokenStatus status) { 54 user_manager::User::OAuthTokenStatus status) {
55 if (status == User::OAUTH_TOKEN_STATUS_UNKNOWN) 55 if (status == user_manager::User::OAUTH_TOKEN_STATUS_UNKNOWN)
56 return; 56 return;
57 if (status == User::OAUTH2_TOKEN_STATUS_INVALID) { 57 if (status == user_manager::User::OAUTH2_TOKEN_STATUS_INVALID) {
58 GetScreen(host())->ShowManagerInconsistentStateErrorScreen(); 58 GetScreen(host())->ShowManagerInconsistentStateErrorScreen();
59 return; 59 return;
60 } 60 }
61 DCHECK(status == User::OAUTH2_TOKEN_STATUS_VALID); 61 DCHECK(status == user_manager::User::OAUTH2_TOKEN_STATUS_VALID);
62 // We expect that LaunchExtraSteps is called by this time (local 62 // We expect that LaunchExtraSteps is called by this time (local
63 // authentication happens before oauth token validation). 63 // authentication happens before oauth token validation).
64 token_validated_ = true; 64 token_validated_ = true;
65 65
66 if (token_validated_ && logged_in_) { 66 if (token_validated_ && logged_in_) {
67 if (!session_started_) 67 if (!session_started_)
68 GetScreen(host())->OnManagerFullyAuthenticated(manager_profile_); 68 GetScreen(host())->OnManagerFullyAuthenticated(manager_profile_);
69 session_started_ = true; 69 session_started_ = true;
70 } 70 }
71 } 71 }
(...skipping 24 matching lines...) Expand all
96 if (token_validated_ && logged_in_) { 96 if (token_validated_ && logged_in_) {
97 if (!session_started_) 97 if (!session_started_)
98 GetScreen(host())->OnManagerFullyAuthenticated(manager_profile_); 98 GetScreen(host())->OnManagerFullyAuthenticated(manager_profile_);
99 session_started_ = true; 99 session_started_ = true;
100 } else { 100 } else {
101 GetScreen(host())->OnManagerCryptohomeAuthenticated(); 101 GetScreen(host())->OnManagerCryptohomeAuthenticated();
102 } 102 }
103 } 103 }
104 104
105 } // namespace chromeos 105 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698