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

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 2530833002: Start authpolicyd (Closed)
Patch Set: Created 4 years 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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/ui/webui/chromeos/login/signin_screen_handler.h" 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h" 68 #include "chrome/browser/ui/webui/chromeos/login/native_window_delegate.h"
69 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h" 69 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
70 #include "chrome/common/channel_info.h" 70 #include "chrome/common/channel_info.h"
71 #include "chrome/common/pref_names.h" 71 #include "chrome/common/pref_names.h"
72 #include "chrome/common/url_constants.h" 72 #include "chrome/common/url_constants.h"
73 #include "chrome/grit/chromium_strings.h" 73 #include "chrome/grit/chromium_strings.h"
74 #include "chrome/grit/generated_resources.h" 74 #include "chrome/grit/generated_resources.h"
75 #include "chromeos/chromeos_switches.h" 75 #include "chromeos/chromeos_switches.h"
76 #include "chromeos/dbus/dbus_thread_manager.h" 76 #include "chromeos/dbus/dbus_thread_manager.h"
77 #include "chromeos/dbus/power_manager_client.h" 77 #include "chromeos/dbus/power_manager_client.h"
78 #include "chromeos/dbus/upstart_client.h"
78 #include "chromeos/login/auth/key.h" 79 #include "chromeos/login/auth/key.h"
79 #include "chromeos/login/auth/user_context.h" 80 #include "chromeos/login/auth/user_context.h"
80 #include "chromeos/network/network_state.h" 81 #include "chromeos/network/network_state.h"
81 #include "chromeos/network/network_state_handler.h" 82 #include "chromeos/network/network_state_handler.h"
82 #include "components/login/localized_values_builder.h" 83 #include "components/login/localized_values_builder.h"
83 #include "components/prefs/pref_registry_simple.h" 84 #include "components/prefs/pref_registry_simple.h"
84 #include "components/prefs/pref_service.h" 85 #include "components/prefs/pref_service.h"
85 #include "components/prefs/scoped_user_pref_update.h" 86 #include "components/prefs/scoped_user_pref_update.h"
86 #include "components/proximity_auth/screenlock_bridge.h" 87 #include "components/proximity_auth/screenlock_bridge.h"
87 #include "components/strings/grit/components_strings.h" 88 #include "components/strings/grit/components_strings.h"
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after
1191 SendReauthReason(AccountId::FromUserEmail(email)); 1192 SendReauthReason(AccountId::FromUserEmail(email));
1192 OnShowAddUser(); 1193 OnShowAddUser();
1193 } 1194 }
1194 1195
1195 void SigninScreenHandler::HandleToggleEnrollmentScreen() { 1196 void SigninScreenHandler::HandleToggleEnrollmentScreen() {
1196 if (delegate_) 1197 if (delegate_)
1197 delegate_->ShowEnterpriseEnrollmentScreen(); 1198 delegate_->ShowEnterpriseEnrollmentScreen();
1198 } 1199 }
1199 1200
1200 void SigninScreenHandler::HandleToggleEnrollmentAd() { 1201 void SigninScreenHandler::HandleToggleEnrollmentAd() {
1202 // TODO(rsorokin): Cleanup enrollment flow for Active Directory. (see
1203 // crbug.com/668491).
1201 if (chrome::GetChannel() == version_info::Channel::BETA || 1204 if (chrome::GetChannel() == version_info::Channel::BETA ||
1202 chrome::GetChannel() == version_info::Channel::STABLE) { 1205 chrome::GetChannel() == version_info::Channel::STABLE) {
1203 return; 1206 return;
1204 } 1207 }
1205 base::CommandLine::ForCurrentProcess()->AppendSwitch( 1208 base::CommandLine::ForCurrentProcess()->AppendSwitch(
1206 chromeos::switches::kEnableAd); 1209 chromeos::switches::kEnableAd);
1210 chromeos::DBusThreadManager* thread_manager =
1211 chromeos::DBusThreadManager::Get();
1212 DCHECK(thread_manager);
Alexander Alekseev 2016/12/01 09:02:20 ditto
Roman Sorokin (ftl) 2016/12/01 13:18:56 Done.
1213 chromeos::UpstartClient* upstart_client = thread_manager->GetUpstartClient();
1214 DCHECK(upstart_client);
Alexander Alekseev 2016/12/01 09:02:20 ditto
Roman Sorokin (ftl) 2016/12/01 13:18:56 Done.
1215 upstart_client->StartAuthPolicyService();
1207 HandleToggleEnrollmentScreen(); 1216 HandleToggleEnrollmentScreen();
1208 } 1217 }
1209 1218
1210 void SigninScreenHandler::HandleToggleEnableDebuggingScreen() { 1219 void SigninScreenHandler::HandleToggleEnableDebuggingScreen() {
1211 if (delegate_) 1220 if (delegate_)
1212 delegate_->ShowEnableDebuggingScreen(); 1221 delegate_->ShowEnableDebuggingScreen();
1213 } 1222 }
1214 1223
1215 void SigninScreenHandler::HandleToggleKioskEnableScreen() { 1224 void SigninScreenHandler::HandleToggleKioskEnableScreen() {
1216 policy::BrowserPolicyConnectorChromeOS* connector = 1225 policy::BrowserPolicyConnectorChromeOS* connector =
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 } 1542 }
1534 1543
1535 void SigninScreenHandler::OnFeedbackFinished() { 1544 void SigninScreenHandler::OnFeedbackFinished() {
1536 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI"); 1545 CallJS("login.UnrecoverableCryptohomeErrorScreen.resumeAfterFeedbackUI");
1537 1546
1538 // Recreate user's cryptohome after the feedback is attempted. 1547 // Recreate user's cryptohome after the feedback is attempted.
1539 HandleResyncUserData(); 1548 HandleResyncUserData();
1540 } 1549 }
1541 1550
1542 } // namespace chromeos 1551 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698