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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller.cc

Issue 2438063002: user_manager: Remove deps on session_manager (Closed)
Patch Set: fix nits in PS1 Created 4 years, 2 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
OLDNEW
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 "chrome/browser/chromeos/login/existing_user_controller.h" 5 #include "chrome/browser/chromeos/login/existing_user_controller.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 #include "chromeos/login/user_names.h" 56 #include "chromeos/login/user_names.h"
57 #include "chromeos/settings/cros_settings_names.h" 57 #include "chromeos/settings/cros_settings_names.h"
58 #include "components/google/core/browser/google_util.h" 58 #include "components/google/core/browser/google_util.h"
59 #include "components/policy/core/common/cloud/cloud_policy_core.h" 59 #include "components/policy/core/common/cloud/cloud_policy_core.h"
60 #include "components/policy/core/common/cloud/cloud_policy_store.h" 60 #include "components/policy/core/common/cloud/cloud_policy_store.h"
61 #include "components/policy/core/common/policy_map.h" 61 #include "components/policy/core/common/policy_map.h"
62 #include "components/policy/core/common/policy_service.h" 62 #include "components/policy/core/common/policy_service.h"
63 #include "components/policy/core/common/policy_types.h" 63 #include "components/policy/core/common/policy_types.h"
64 #include "components/policy/policy_constants.h" 64 #include "components/policy/policy_constants.h"
65 #include "components/prefs/pref_service.h" 65 #include "components/prefs/pref_service.h"
66 #include "components/session_manager/core/session_manager.h"
66 #include "components/signin/core/account_id/account_id.h" 67 #include "components/signin/core/account_id/account_id.h"
67 #include "components/signin/core/browser/signin_client.h" 68 #include "components/signin/core/browser/signin_client.h"
68 #include "components/user_manager/known_user.h" 69 #include "components/user_manager/known_user.h"
69 #include "components/user_manager/user_manager.h" 70 #include "components/user_manager/user_manager.h"
70 #include "components/user_manager/user_type.h" 71 #include "components/user_manager/user_type.h"
71 #include "components/version_info/version_info.h" 72 #include "components/version_info/version_info.h"
72 #include "content/public/browser/browser_thread.h" 73 #include "content/public/browser/browser_thread.h"
73 #include "content/public/browser/notification_service.h" 74 #include "content/public/browser/notification_service.h"
74 #include "content/public/browser/notification_types.h" 75 #include "content/public/browser/notification_types.h"
75 #include "content/public/browser/user_metrics.h" 76 #include "content/public/browser/user_metrics.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 easy_unlock_service->RecordPasswordLoginEvent(user_context.GetAccountId()); 145 easy_unlock_service->RecordPasswordLoginEvent(user_context.GetAccountId());
145 } 146 }
146 } 147 }
147 148
148 bool CanShowDebuggingFeatures() { 149 bool CanShowDebuggingFeatures() {
149 // We need to be on the login screen and in dev mode to show this menu item. 150 // We need to be on the login screen and in dev mode to show this menu item.
150 return base::CommandLine::ForCurrentProcess()->HasSwitch( 151 return base::CommandLine::ForCurrentProcess()->HasSwitch(
151 chromeos::switches::kSystemDevMode) && 152 chromeos::switches::kSystemDevMode) &&
152 base::CommandLine::ForCurrentProcess()->HasSwitch( 153 base::CommandLine::ForCurrentProcess()->HasSwitch(
153 chromeos::switches::kLoginManager) && 154 chromeos::switches::kLoginManager) &&
154 !user_manager::UserManager::Get()->IsSessionStarted(); 155 !session_manager::SessionManager::Get()->IsSessionStarted();
155 } 156 }
156 157
157 void RecordPasswordChangeFlow(LoginPasswordChangeFlow flow) { 158 void RecordPasswordChangeFlow(LoginPasswordChangeFlow flow) {
158 UMA_HISTOGRAM_ENUMERATION("Login.PasswordChangeFlow", flow, 159 UMA_HISTOGRAM_ENUMERATION("Login.PasswordChangeFlow", flow,
159 LOGIN_PASSWORD_CHANGE_FLOW_COUNT); 160 LOGIN_PASSWORD_CHANGE_FLOW_COUNT);
160 } 161 }
161 162
162 } // namespace 163 } // namespace
163 164
164 // static 165 // static
(...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 } 1263 }
1263 1264
1264 // Otherwise, show the unrecoverable cryptohome error UI and ask user's 1265 // Otherwise, show the unrecoverable cryptohome error UI and ask user's
1265 // permission to collect a feedback. 1266 // permission to collect a feedback.
1266 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE); 1267 RecordPasswordChangeFlow(LOGIN_PASSWORD_CHANGE_FLOW_CRYPTOHOME_FAILURE);
1267 VLOG(1) << "Show unrecoverable cryptohome error dialog."; 1268 VLOG(1) << "Show unrecoverable cryptohome error dialog.";
1268 login_display_->ShowUnrecoverableCrypthomeErrorDialog(); 1269 login_display_->ShowUnrecoverableCrypthomeErrorDialog();
1269 } 1270 }
1270 1271
1271 } // namespace chromeos 1272 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/demo_mode/demo_app_launcher.cc ('k') | chrome/browser/chromeos/login/screens/error_screen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698