Skip to content

Commit

Permalink
Start authpolicyd
Browse files Browse the repository at this point in the history
Start in two places:
-On press custom shortcut (Ctrl-Alt-Shift-A) for the enrollment
-On reading install attributes in case it's Active Directory managed
device.

BUG=638663
TEST=manual

Review-Url: https://codereview.chromium.org/2530833002
Cr-Commit-Position: refs/heads/master@{#435603}
  • Loading branch information
rsorokin authored and Commit bot committed Dec 1, 2016
1 parent 1b81c58 commit 3bfc9e3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#include "chromeos/cryptohome/system_salt_getter.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/upstart_client.h"
#include "chromeos/network/network_handler.h"
#include "chromeos/network/onc/onc_certificate_importer_impl.h"
#include "chromeos/settings/cros_settings_names.h"
Expand Down Expand Up @@ -110,6 +111,10 @@ BrowserPolicyConnectorChromeOS::BrowserPolicyConnectorChromeOS()
GetBackgroundTaskRunner());

if (install_attributes_->IsActiveDirectoryManaged()) {
chromeos::DBusThreadManager::Get()
->GetUpstartClient()
->StartAuthPolicyService();

device_active_directory_policy_manager_ =
new DeviceActiveDirectoryPolicyManager(
std::move(device_cloud_policy_store));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
#include "chromeos/chromeos_switches.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/power_manager_client.h"
#include "chromeos/dbus/upstart_client.h"
#include "chromeos/login/auth/key.h"
#include "chromeos/login/auth/user_context.h"
#include "chromeos/network/network_state.h"
Expand Down Expand Up @@ -1198,12 +1199,17 @@ void SigninScreenHandler::HandleToggleEnrollmentScreen() {
}

void SigninScreenHandler::HandleToggleEnrollmentAd() {
// TODO(rsorokin): Cleanup enrollment flow for Active Directory. (see
// crbug.com/668491).
if (chrome::GetChannel() == version_info::Channel::BETA ||
chrome::GetChannel() == version_info::Channel::STABLE) {
return;
}
base::CommandLine::ForCurrentProcess()->AppendSwitch(
chromeos::switches::kEnableAd);
chromeos::DBusThreadManager::Get()
->GetUpstartClient()
->StartAuthPolicyService();
HandleToggleEnrollmentScreen();
}

Expand Down

0 comments on commit 3bfc9e3

Please sign in to comment.