Commit 87e30413 authored by Felipe Andrade's avatar Felipe Andrade Committed by Commit Bot

Unify authpolicy files names to make it consistent across the codebase

Replace auth_policy by authpolicy on files and variables names to make
them consistent across the codebase

Bug: 964911
Change-Id: I291c8ed90512136dc312fd69699ff5d7c974cad5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929245Reviewed-by: default avatarRoman Sorokin [CET] <rsorokin@chromium.org>
Reviewed-by: default avatarAlexander Alekseev <alemate@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Felipe Andrade <fsandrade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719089}
parent ef940720
...@@ -107,8 +107,8 @@ source_set("chromeos") { ...@@ -107,8 +107,8 @@ source_set("chromeos") {
"//chromeos/dbus:update_engine_proto", "//chromeos/dbus:update_engine_proto",
"//chromeos/dbus:vm_plugin_dispatcher_proto", "//chromeos/dbus:vm_plugin_dispatcher_proto",
"//chromeos/dbus/audio", "//chromeos/dbus/audio",
"//chromeos/dbus/auth_policy", "//chromeos/dbus/authpolicy",
"//chromeos/dbus/auth_policy:authpolicy_proto", "//chromeos/dbus/authpolicy:authpolicy_proto",
"//chromeos/dbus/biod", "//chromeos/dbus/biod",
"//chromeos/dbus/constants", "//chromeos/dbus/constants",
"//chromeos/dbus/cros_healthd", "//chromeos/dbus/cros_healthd",
...@@ -714,8 +714,8 @@ source_set("chromeos") { ...@@ -714,8 +714,8 @@ source_set("chromeos") {
"attestation/tpm_challenge_key_result.h", "attestation/tpm_challenge_key_result.h",
"attestation/tpm_challenge_key_with_timeout.cc", "attestation/tpm_challenge_key_with_timeout.cc",
"attestation/tpm_challenge_key_with_timeout.h", "attestation/tpm_challenge_key_with_timeout.h",
"authpolicy/auth_policy_credentials_manager.cc", "authpolicy/authpolicy_credentials_manager.cc",
"authpolicy/auth_policy_credentials_manager.h", "authpolicy/authpolicy_credentials_manager.h",
"authpolicy/authpolicy_helper.cc", "authpolicy/authpolicy_helper.cc",
"authpolicy/authpolicy_helper.h", "authpolicy/authpolicy_helper.h",
"authpolicy/data_pipe_utils.cc", "authpolicy/data_pipe_utils.cc",
...@@ -2596,7 +2596,7 @@ source_set("unit_tests") { ...@@ -2596,7 +2596,7 @@ source_set("unit_tests") {
"attestation/mock_tpm_challenge_key.h", "attestation/mock_tpm_challenge_key.h",
"attestation/platform_verification_flow_unittest.cc", "attestation/platform_verification_flow_unittest.cc",
"attestation/tpm_challenge_key_unittest.cc", "attestation/tpm_challenge_key_unittest.cc",
"authpolicy/auth_policy_credentials_manager_unittest.cc", "authpolicy/authpolicy_credentials_manager_unittest.cc",
"authpolicy/authpolicy_helper.unittest.cc", "authpolicy/authpolicy_helper.unittest.cc",
"base/file_flusher_unittest.cc", "base/file_flusher_unittest.cc",
"bluetooth/debug_logs_manager_unittest.cc", "bluetooth/debug_logs_manager_unittest.cc",
...@@ -3009,7 +3009,7 @@ source_set("unit_tests") { ...@@ -3009,7 +3009,7 @@ source_set("unit_tests") {
"//chromeos/constants", "//chromeos/constants",
"//chromeos/cryptohome:test_support", "//chromeos/cryptohome:test_support",
"//chromeos/dbus:test_support", "//chromeos/dbus:test_support",
"//chromeos/dbus/auth_policy", "//chromeos/dbus/authpolicy",
"//chromeos/dbus/cryptohome", "//chromeos/dbus/cryptohome",
"//chromeos/dbus/cryptohome:attestation_proto", "//chromeos/dbus/cryptohome:attestation_proto",
"//chromeos/dbus/dlcservice:test_support", "//chromeos/dbus/dlcservice:test_support",
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h" #include "chrome/browser/chromeos/authpolicy/authpolicy_credentials_manager.h"
#include <memory> #include <memory>
#include <utility> #include <utility>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "chrome/grit/theme_resources.h" #include "chrome/grit/theme_resources.h"
#include "chromeos/components/account_manager/account_manager.h" #include "chromeos/components/account_manager/account_manager.h"
#include "chromeos/components/account_manager/account_manager_factory.h" #include "chromeos/components/account_manager/account_manager_factory.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/network/network_handler.h" #include "chromeos/network/network_handler.h"
#include "chromeos/network/network_state.h" #include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_handler.h" #include "chromeos/network/network_state_handler.h"
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTH_POLICY_CREDENTIALS_MANAGER_H_ #ifndef CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTHPOLICY_CREDENTIALS_MANAGER_H_
#define CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTH_POLICY_CREDENTIALS_MANAGER_H_ #define CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTHPOLICY_CREDENTIALS_MANAGER_H_
#include <set> #include <set>
#include <string> #include <string>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
#include "base/cancelable_callback.h" #include "base/cancelable_callback.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "chrome/browser/chromeos/authpolicy/kerberos_files_handler.h" #include "chrome/browser/chromeos/authpolicy/kerberos_files_handler.h"
#include "chromeos/dbus/auth_policy/active_directory_info.pb.h" #include "chromeos/dbus/authpolicy/active_directory_info.pb.h"
#include "chromeos/network/network_state_handler_observer.h" #include "chromeos/network/network_state_handler_observer.h"
#include "components/account_id/account_id.h" #include "components/account_id/account_id.h"
#include "components/keyed_service/content/browser_context_keyed_service_factory.h" #include "components/keyed_service/content/browser_context_keyed_service_factory.h"
...@@ -147,4 +147,4 @@ class AuthPolicyCredentialsManagerFactory ...@@ -147,4 +147,4 @@ class AuthPolicyCredentialsManagerFactory
} // namespace chromeos } // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTH_POLICY_CREDENTIALS_MANAGER_H_ #endif // CHROME_BROWSER_CHROMEOS_AUTHPOLICY_AUTHPOLICY_CREDENTIALS_MANAGER_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h" #include "chrome/browser/chromeos/authpolicy/authpolicy_credentials_manager.h"
#include <memory> #include <memory>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "chrome/test/base/scoped_testing_local_state.h" #include "chrome/test/base/scoped_testing_local_state.h"
#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h" #include "chrome/test/base/testing_profile.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/network/network_handler.h" #include "chromeos/network/network_handler.h"
#include "components/user_manager/scoped_user_manager.h" #include "components/user_manager/scoped_user_manager.h"
...@@ -53,7 +53,7 @@ class AuthPolicyCredentialsManagerTest : public testing::Test { ...@@ -53,7 +53,7 @@ class AuthPolicyCredentialsManagerTest : public testing::Test {
chromeos::DBusThreadManager::Initialize(); chromeos::DBusThreadManager::Initialize();
chromeos::NetworkHandler::Initialize(); chromeos::NetworkHandler::Initialize();
AuthPolicyClient::InitializeFake(); AuthPolicyClient::InitializeFake();
fake_auth_policy_client()->DisableOperationDelayForTesting(); fake_authpolicy_client()->DisableOperationDelayForTesting();
TestingProfile::Builder profile_builder; TestingProfile::Builder profile_builder;
profile_builder.SetProfileName(kProfileEmail); profile_builder.SetProfileName(kProfileEmail);
...@@ -62,18 +62,17 @@ class AuthPolicyCredentialsManagerTest : public testing::Test { ...@@ -62,18 +62,17 @@ class AuthPolicyCredentialsManagerTest : public testing::Test {
mock_user_manager()->AddUser(account_id_); mock_user_manager()->AddUser(account_id_);
base::RunLoop run_loop; base::RunLoop run_loop;
fake_auth_policy_client()->set_on_get_status_closure( fake_authpolicy_client()->set_on_get_status_closure(run_loop.QuitClosure());
run_loop.QuitClosure());
profile_ = profile_builder.Build(); profile_ = profile_builder.Build();
display_service_ = display_service_ =
std::make_unique<NotificationDisplayServiceTester>(profile()); std::make_unique<NotificationDisplayServiceTester>(profile());
auth_policy_credentials_manager_ = authpolicy_credentials_manager_ =
static_cast<AuthPolicyCredentialsManager*>( static_cast<AuthPolicyCredentialsManager*>(
AuthPolicyCredentialsManagerFactory::GetInstance() AuthPolicyCredentialsManagerFactory::GetInstance()
->GetServiceForBrowserContext(profile(), false /* create */)); ->GetServiceForBrowserContext(profile(), false /* create */));
EXPECT_TRUE(auth_policy_credentials_manager_); EXPECT_TRUE(authpolicy_credentials_manager_);
EXPECT_CALL(*mock_user_manager(), EXPECT_CALL(*mock_user_manager(),
SaveForceOnlineSignin(account_id(), false)); SaveForceOnlineSignin(account_id(), false));
...@@ -92,10 +91,10 @@ class AuthPolicyCredentialsManagerTest : public testing::Test { ...@@ -92,10 +91,10 @@ class AuthPolicyCredentialsManagerTest : public testing::Test {
protected: protected:
AccountId& account_id() { return account_id_; } AccountId& account_id() { return account_id_; }
TestingProfile* profile() { return profile_.get(); } TestingProfile* profile() { return profile_.get(); }
AuthPolicyCredentialsManager* auth_policy_credentials_manager() { AuthPolicyCredentialsManager* authpolicy_credentials_manager() {
return auth_policy_credentials_manager_; return authpolicy_credentials_manager_;
} }
chromeos::FakeAuthPolicyClient* fake_auth_policy_client() const { chromeos::FakeAuthPolicyClient* fake_authpolicy_client() const {
return chromeos::FakeAuthPolicyClient::Get(); return chromeos::FakeAuthPolicyClient::Get();
} }
...@@ -120,9 +119,8 @@ class AuthPolicyCredentialsManagerTest : public testing::Test { ...@@ -120,9 +119,8 @@ class AuthPolicyCredentialsManagerTest : public testing::Test {
void CallGetUserStatusAndWait() { void CallGetUserStatusAndWait() {
base::RunLoop run_loop; base::RunLoop run_loop;
fake_auth_policy_client()->set_on_get_status_closure( fake_authpolicy_client()->set_on_get_status_closure(run_loop.QuitClosure());
run_loop.QuitClosure()); authpolicy_credentials_manager()->GetUserStatus();
auth_policy_credentials_manager()->GetUserStatus();
run_loop.Run(); run_loop.Run();
testing::Mock::VerifyAndClearExpectations(mock_user_manager()); testing::Mock::VerifyAndClearExpectations(mock_user_manager());
} }
...@@ -132,7 +130,7 @@ class AuthPolicyCredentialsManagerTest : public testing::Test { ...@@ -132,7 +130,7 @@ class AuthPolicyCredentialsManagerTest : public testing::Test {
std::unique_ptr<TestingProfile> profile_; std::unique_ptr<TestingProfile> profile_;
// Owned by AuthPolicyCredentialsManagerFactory. // Owned by AuthPolicyCredentialsManagerFactory.
AuthPolicyCredentialsManager* auth_policy_credentials_manager_; AuthPolicyCredentialsManager* authpolicy_credentials_manager_;
user_manager::ScopedUserManager user_manager_enabler_; user_manager::ScopedUserManager user_manager_enabler_;
std::unique_ptr<NotificationDisplayServiceTester> display_service_; std::unique_ptr<NotificationDisplayServiceTester> display_service_;
...@@ -146,8 +144,8 @@ class AuthPolicyCredentialsManagerTest : public testing::Test { ...@@ -146,8 +144,8 @@ class AuthPolicyCredentialsManagerTest : public testing::Test {
// Tests saving display and given name into user manager. No error means no // Tests saving display and given name into user manager. No error means no
// notifications are shown. // notifications are shown.
TEST_F(AuthPolicyCredentialsManagerTest, SaveNames) { TEST_F(AuthPolicyCredentialsManagerTest, SaveNames) {
fake_auth_policy_client()->set_display_name(kDisplayName); fake_authpolicy_client()->set_display_name(kDisplayName);
fake_auth_policy_client()->set_given_name(kGivenName); fake_authpolicy_client()->set_given_name(kGivenName);
user_manager::UserManager::UserAccountData user_account_data( user_manager::UserManager::UserAccountData user_account_data(
base::UTF8ToUTF16(kDisplayName), base::UTF8ToUTF16(kGivenName), base::UTF8ToUTF16(kDisplayName), base::UTF8ToUTF16(kGivenName),
std::string() /* locale */); std::string() /* locale */);
...@@ -165,7 +163,7 @@ TEST_F(AuthPolicyCredentialsManagerTest, SaveNames) { ...@@ -165,7 +163,7 @@ TEST_F(AuthPolicyCredentialsManagerTest, SaveNames) {
TEST_F(AuthPolicyCredentialsManagerTest, ShowSameNotificationOnce) { TEST_F(AuthPolicyCredentialsManagerTest, ShowSameNotificationOnce) {
// In case of expired password save to force online signin and show // In case of expired password save to force online signin and show
// notification. // notification.
fake_auth_policy_client()->set_password_status( fake_authpolicy_client()->set_password_status(
authpolicy::ActiveDirectoryUserStatus::PASSWORD_EXPIRED); authpolicy::ActiveDirectoryUserStatus::PASSWORD_EXPIRED);
EXPECT_CALL(*mock_user_manager(), SaveForceOnlineSignin(account_id(), true)); EXPECT_CALL(*mock_user_manager(), SaveForceOnlineSignin(account_id(), true));
CallGetUserStatusAndWait(); CallGetUserStatusAndWait();
...@@ -182,9 +180,9 @@ TEST_F(AuthPolicyCredentialsManagerTest, ShowSameNotificationOnce) { ...@@ -182,9 +180,9 @@ TEST_F(AuthPolicyCredentialsManagerTest, ShowSameNotificationOnce) {
TEST_F(AuthPolicyCredentialsManagerTest, ShowDifferentNotifications) { TEST_F(AuthPolicyCredentialsManagerTest, ShowDifferentNotifications) {
// In case of expired password save to force online signin and show // In case of expired password save to force online signin and show
// notification. // notification.
fake_auth_policy_client()->set_password_status( fake_authpolicy_client()->set_password_status(
authpolicy::ActiveDirectoryUserStatus::PASSWORD_CHANGED); authpolicy::ActiveDirectoryUserStatus::PASSWORD_CHANGED);
fake_auth_policy_client()->set_tgt_status( fake_authpolicy_client()->set_tgt_status(
authpolicy::ActiveDirectoryUserStatus::TGT_EXPIRED); authpolicy::ActiveDirectoryUserStatus::TGT_EXPIRED);
EXPECT_CALL(*mock_user_manager(), SaveForceOnlineSignin(account_id(), true)); EXPECT_CALL(*mock_user_manager(), SaveForceOnlineSignin(account_id(), true));
CallGetUserStatusAndWait(); CallGetUserStatusAndWait();
...@@ -197,7 +195,7 @@ TEST_F(AuthPolicyCredentialsManagerTest, ShowDifferentNotifications) { ...@@ -197,7 +195,7 @@ TEST_F(AuthPolicyCredentialsManagerTest, ShowDifferentNotifications) {
// Tests invalid TGT status does not force online signin but still shows // Tests invalid TGT status does not force online signin but still shows
// a notification. // a notification.
TEST_F(AuthPolicyCredentialsManagerTest, InvalidTGTDoesntForceOnlineSignin) { TEST_F(AuthPolicyCredentialsManagerTest, InvalidTGTDoesntForceOnlineSignin) {
fake_auth_policy_client()->set_tgt_status( fake_authpolicy_client()->set_tgt_status(
authpolicy::ActiveDirectoryUserStatus::TGT_EXPIRED); authpolicy::ActiveDirectoryUserStatus::TGT_EXPIRED);
EXPECT_CALL(*mock_user_manager(), SaveForceOnlineSignin(account_id(), false)); EXPECT_CALL(*mock_user_manager(), SaveForceOnlineSignin(account_id(), false));
CallGetUserStatusAndWait(); CallGetUserStatusAndWait();
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "chrome/browser/chromeos/authpolicy/data_pipe_utils.h" #include "chrome/browser/chromeos/authpolicy/data_pipe_utils.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/upstart/upstart_client.h" #include "chromeos/dbus/upstart/upstart_client.h"
#include "chromeos/tpm/install_attributes.h" #include "chromeos/tpm/install_attributes.h"
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
namespace chromeos { namespace chromeos {
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "chrome/browser/chromeos/authpolicy/authpolicy_helper.h" #include "chrome/browser/chromeos/authpolicy/authpolicy_helper.h"
#include "base/bind.h" #include "base/bind.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/tpm/stub_install_attributes.h" #include "chromeos/tpm/stub_install_attributes.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include "chromeos/cryptohome/system_salt_getter.h" #include "chromeos/cryptohome/system_salt_getter.h"
#include "chromeos/dbus/arc_camera_client.h" #include "chromeos/dbus/arc_camera_client.h"
#include "chromeos/dbus/audio/cras_audio_client.h" #include "chromeos/dbus/audio/cras_audio_client.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/dbus/biod/biod_client.h" #include "chromeos/dbus/biod/biod_client.h"
#include "chromeos/dbus/cros_healthd/cros_healthd_client.h" #include "chromeos/dbus/cros_healthd/cros_healthd_client.h"
#include "chromeos/dbus/cups_proxy/cups_proxy_client.h" #include "chromeos/dbus/cups_proxy/cups_proxy_client.h"
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include "chrome/browser/chromeos/login/test/oobe_base_test.h" #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
#include "chrome/browser/chromeos/login/test/session_manager_state_waiter.h" #include "chrome/browser/chromeos/login/test/session_manager_state_waiter.h"
#include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "components/user_manager/user_names.h" #include "components/user_manager/user_names.h"
#include "content/public/browser/network_service_instance.h" #include "content/public/browser/network_service_instance.h"
#include "content/public/common/network_service_util.h" #include "content/public/common/network_service_util.h"
...@@ -63,7 +63,7 @@ class ActiveDirectoryLoginTest : public OobeBaseTest { ...@@ -63,7 +63,7 @@ class ActiveDirectoryLoginTest : public OobeBaseTest {
~ActiveDirectoryLoginTest() override = default; ~ActiveDirectoryLoginTest() override = default;
protected: protected:
FakeAuthPolicyClient* fake_auth_policy_client() { FakeAuthPolicyClient* fake_authpolicy_client() {
return FakeAuthPolicyClient::Get(); return FakeAuthPolicyClient::Get();
} }
...@@ -87,7 +87,7 @@ class ActiveDirectoryLoginAutocompleteTest : public ActiveDirectoryLoginTest { ...@@ -87,7 +87,7 @@ class ActiveDirectoryLoginAutocompleteTest : public ActiveDirectoryLoginTest {
enterprise_management::ChromeDeviceSettingsProto device_settings; enterprise_management::ChromeDeviceSettingsProto device_settings;
device_settings.mutable_login_screen_domain_auto_complete() device_settings.mutable_login_screen_domain_auto_complete()
->set_login_screen_domain_auto_complete(kTestUserRealm); ->set_login_screen_domain_auto_complete(kTestUserRealm);
fake_auth_policy_client()->set_device_policy(device_settings); fake_authpolicy_client()->set_device_policy(device_settings);
autocomplete_realm_ = "@" + std::string(kTestUserRealm); autocomplete_realm_ = "@" + std::string(kTestUserRealm);
ad_login_.set_autocomplete_realm(autocomplete_realm_); ad_login_.set_autocomplete_realm(autocomplete_realm_);
} }
...@@ -150,19 +150,19 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, LoginErrors) { ...@@ -150,19 +150,19 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, LoginErrors) {
ad_login_.TestUserError(); ad_login_.TestUserError();
ad_login_.TestDomainHidden(); ad_login_.TestDomainHidden();
fake_auth_policy_client()->set_auth_error(authpolicy::ERROR_BAD_USER_NAME); fake_authpolicy_client()->set_auth_error(authpolicy::ERROR_BAD_USER_NAME);
ad_login_.SubmitActiveDirectoryCredentials(test_user_, kPassword); ad_login_.SubmitActiveDirectoryCredentials(test_user_, kPassword);
ad_login_.WaitForAuthError(); ad_login_.WaitForAuthError();
ad_login_.TestUserError(); ad_login_.TestUserError();
ad_login_.TestDomainHidden(); ad_login_.TestDomainHidden();
fake_auth_policy_client()->set_auth_error(authpolicy::ERROR_BAD_PASSWORD); fake_authpolicy_client()->set_auth_error(authpolicy::ERROR_BAD_PASSWORD);
ad_login_.SubmitActiveDirectoryCredentials(test_user_, kPassword); ad_login_.SubmitActiveDirectoryCredentials(test_user_, kPassword);
ad_login_.WaitForAuthError(); ad_login_.WaitForAuthError();
ad_login_.TestPasswordError(); ad_login_.TestPasswordError();
ad_login_.TestDomainHidden(); ad_login_.TestDomainHidden();
fake_auth_policy_client()->set_auth_error(authpolicy::ERROR_UNKNOWN); fake_authpolicy_client()->set_auth_error(authpolicy::ERROR_UNKNOWN);
ad_login_.SubmitActiveDirectoryCredentials(test_user_, kPassword); ad_login_.SubmitActiveDirectoryCredentials(test_user_, kPassword);
ad_login_.WaitForAuthError(); ad_login_.WaitForAuthError();
// Inputs are not invalidated for the unknown error. // Inputs are not invalidated for the unknown error.
...@@ -180,7 +180,7 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, PasswordChange_LoginSuccess) { ...@@ -180,7 +180,7 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, PasswordChange_LoginSuccess) {
ad_login_.TriggerPasswordChangeScreen(); ad_login_.TriggerPasswordChangeScreen();
// Password accepted by AuthPolicyClient. // Password accepted by AuthPolicyClient.
fake_auth_policy_client()->set_auth_error(authpolicy::ERROR_NONE); fake_authpolicy_client()->set_auth_error(authpolicy::ERROR_NONE);
ad_login_.SubmitActiveDirectoryPasswordChangeCredentials( ad_login_.SubmitActiveDirectoryPasswordChangeCredentials(
kPassword, kNewPassword, kNewPassword); kPassword, kNewPassword, kNewPassword);
test::WaitForPrimaryUserSessionStart(); test::WaitForPrimaryUserSessionStart();
...@@ -214,7 +214,7 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, PasswordChange_UIErrors) { ...@@ -214,7 +214,7 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginTest, PasswordChange_UIErrors) {
ad_login_.TestPasswordChangeConfirmNewPasswordError(); ad_login_.TestPasswordChangeConfirmNewPasswordError();
// Password rejected by AuthPolicyClient. // Password rejected by AuthPolicyClient.
fake_auth_policy_client()->set_auth_error(authpolicy::ERROR_BAD_PASSWORD); fake_authpolicy_client()->set_auth_error(authpolicy::ERROR_BAD_PASSWORD);
ad_login_.SubmitActiveDirectoryPasswordChangeCredentials( ad_login_.SubmitActiveDirectoryPasswordChangeCredentials(
kPassword, kNewPassword, kNewPassword); kPassword, kNewPassword, kNewPassword);
ad_login_.TestPasswordChangeOldPasswordError(); ad_login_.TestPasswordChangeOldPasswordError();
...@@ -274,7 +274,7 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginAutocompleteTest, TestAutocomplete) { ...@@ -274,7 +274,7 @@ IN_PROC_BROWSER_TEST_F(ActiveDirectoryLoginAutocompleteTest, TestAutocomplete) {
ad_login_.TestLoginVisible(); ad_login_.TestLoginVisible();
ad_login_.TestDomainVisible(); ad_login_.TestDomainVisible();
fake_auth_policy_client()->set_auth_error(authpolicy::ERROR_BAD_PASSWORD); fake_authpolicy_client()->set_auth_error(authpolicy::ERROR_BAD_PASSWORD);
// Submit with a different domain. // Submit with a different domain.
ad_login_.SetUserInput(test_user_); ad_login_.SetUserInput(test_user_);
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.h" #include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.h"
#include "chrome/browser/chromeos/login/oobe_screen.h" #include "chrome/browser/chromeos/login/oobe_screen.h"
#include "chromeos/dbus/auth_policy/active_directory_info.pb.h" #include "chromeos/dbus/authpolicy/active_directory_info.pb.h"
class GoogleServiceAuthError; class GoogleServiceAuthError;
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "chrome/browser/chromeos/login/wizard_controller.h" #include "chrome/browser/chromeos/login/wizard_controller.h"
#include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h" #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
#include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h" #include "chrome/browser/chromeos/policy/enrollment_status_chromeos.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "chromeos/dbus/constants/dbus_switches.h" #include "chromeos/dbus/constants/dbus_switches.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/upstart/upstart_client.h" #include "chromeos/dbus/upstart/upstart_client.h"
...@@ -206,8 +206,8 @@ class ActiveDirectoryJoinTest : public EnterpriseEnrollmentTest { ...@@ -206,8 +206,8 @@ class ActiveDirectoryJoinTest : public EnterpriseEnrollmentTest {
ActiveDirectoryJoinTest() = default; ActiveDirectoryJoinTest() = default;
void SetUp() override { void SetUp() override {
mock_auth_policy_client_ = new MockAuthPolicyClient(); mock_authpolicy_client_ = new MockAuthPolicyClient();
mock_auth_policy_client()->DisableOperationDelayForTesting(); mock_authpolicy_client()->DisableOperationDelayForTesting();
EnterpriseEnrollmentTestBase::SetUp(); EnterpriseEnrollmentTestBase::SetUp();
} }
...@@ -380,11 +380,11 @@ class ActiveDirectoryJoinTest : public EnterpriseEnrollmentTest { ...@@ -380,11 +380,11 @@ class ActiveDirectoryJoinTest : public EnterpriseEnrollmentTest {
if (!dm_token.empty()) if (!dm_token.empty())
request->set_dm_token(dm_token); request->set_dm_token(dm_token);
request->set_kerberos_encryption_types(encryption_types); request->set_kerberos_encryption_types(encryption_types);
mock_auth_policy_client()->set_expected_request(std::move(request)); mock_authpolicy_client()->set_expected_request(std::move(request));
} }
MockAuthPolicyClient* mock_auth_policy_client() { MockAuthPolicyClient* mock_authpolicy_client() {
return mock_auth_policy_client_; return mock_authpolicy_client_;
} }
void SetupActiveDirectoryJSNotifications() { void SetupActiveDirectoryJSNotifications() {
...@@ -430,7 +430,7 @@ class ActiveDirectoryJoinTest : public EnterpriseEnrollmentTest { ...@@ -430,7 +430,7 @@ class ActiveDirectoryJoinTest : public EnterpriseEnrollmentTest {
private: private:
// Owned by the AuthPolicyClient global instance. // Owned by the AuthPolicyClient global instance.
MockAuthPolicyClient* mock_auth_policy_client_ = nullptr; MockAuthPolicyClient* mock_authpolicy_client_ = nullptr;
DISALLOW_COPY_AND_ASSIGN(ActiveDirectoryJoinTest); DISALLOW_COPY_AND_ASSIGN(ActiveDirectoryJoinTest);
}; };
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "base/timer/timer.h" #include "base/timer/timer.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h" #include "chrome/browser/chromeos/authpolicy/authpolicy_credentials_manager.h"
#include "chrome/browser/chromeos/login/existing_user_controller.h" #include "chrome/browser/chromeos/login/existing_user_controller.h"
#include "chrome/browser/chromeos/login/help_app_launcher.h" #include "chrome/browser/chromeos/login/help_app_launcher.h"
#include "chrome/browser/chromeos/login/helper.h" #include "chrome/browser/chromeos/login/helper.h"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
#include "chrome/grit/generated_resources.h" #include "chrome/grit/generated_resources.h"
#include "chrome/test/base/testing_browser_process.h" #include "chrome/test/base/testing_browser_process.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "chromeos/dbus/cryptohome/fake_cryptohome_client.h" #include "chromeos/dbus/cryptohome/fake_cryptohome_client.h"
#include "chromeos/dbus/power/fake_power_manager_client.h" #include "chromeos/dbus/power/fake_power_manager_client.h"
#include "chromeos/dbus/session_manager/fake_session_manager_client.h" #include "chromeos/dbus/session_manager/fake_session_manager_client.h"
...@@ -787,13 +787,13 @@ class ExistingUserControllerActiveDirectoryTest ...@@ -787,13 +787,13 @@ class ExistingUserControllerActiveDirectoryTest
// Needs to be a member because this class is a friend of // Needs to be a member because this class is a friend of
// AuthPolicyCredentialsManagerFactory to access GetServiceForBrowserContext. // AuthPolicyCredentialsManagerFactory to access GetServiceForBrowserContext.
KerberosFilesHandler* GetKerberosFilesHandler() { KerberosFilesHandler* GetKerberosFilesHandler() {
auto* auth_policy_credentials_manager = auto* authpolicy_credentials_manager =
static_cast<AuthPolicyCredentialsManager*>( static_cast<AuthPolicyCredentialsManager*>(
AuthPolicyCredentialsManagerFactory::GetInstance() AuthPolicyCredentialsManagerFactory::GetInstance()
->GetServiceForBrowserContext( ->GetServiceForBrowserContext(
ProfileManager::GetLastUsedProfile(), false /* create */)); ProfileManager::GetLastUsedProfile(), false /* create */));
EXPECT_TRUE(auth_policy_credentials_manager); EXPECT_TRUE(authpolicy_credentials_manager);
return auth_policy_credentials_manager->GetKerberosFilesHandlerForTesting(); return authpolicy_credentials_manager->GetKerberosFilesHandlerForTesting();
} }
void LoginAdOnline() { void LoginAdOnline() {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h"
#include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
#include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "content/public/test/browser_test_utils.h" #include "content/public/test/browser_test_utils.h"
namespace chromeos { namespace chromeos {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h" #include "chrome/browser/chromeos/login/users/fake_chrome_user_manager.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/tpm/stub_install_attributes.h" #include "chromeos/tpm/stub_install_attributes.h"
#include "components/account_id/account_id.h" #include "components/account_id/account_id.h"
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "chrome/common/chrome_paths.h" #include "chrome/common/chrome_paths.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
#include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "chromeos/dbus/constants/dbus_paths.h" #include "chromeos/dbus/constants/dbus_paths.h"
#include "chromeos/dbus/cryptohome/cryptohome_client.h" #include "chromeos/dbus/cryptohome/cryptohome_client.h"
#include "chromeos/dbus/session_manager/fake_session_manager_client.h" #include "chromeos/dbus/session_manager/fake_session_manager_client.h"
...@@ -82,16 +82,16 @@ AffiliationTestHelper AffiliationTestHelper::CreateForCloud( ...@@ -82,16 +82,16 @@ AffiliationTestHelper AffiliationTestHelper::CreateForCloud(
chromeos::FakeSessionManagerClient* fake_session_manager_client) { chromeos::FakeSessionManagerClient* fake_session_manager_client) {
return AffiliationTestHelper(ManagementType::kCloud, return AffiliationTestHelper(ManagementType::kCloud,
fake_session_manager_client, fake_session_manager_client,
nullptr /* fake_auth_policy_client */); nullptr /* fake_authpolicy_client */);
} }
// static // static
AffiliationTestHelper AffiliationTestHelper::CreateForActiveDirectory( AffiliationTestHelper AffiliationTestHelper::CreateForActiveDirectory(
chromeos::FakeSessionManagerClient* fake_session_manager_client, chromeos::FakeSessionManagerClient* fake_session_manager_client,
chromeos::FakeAuthPolicyClient* fake_auth_policy_client) { chromeos::FakeAuthPolicyClient* fake_authpolicy_client) {
return AffiliationTestHelper(ManagementType::kActiveDirectory, return AffiliationTestHelper(ManagementType::kActiveDirectory,
fake_session_manager_client, fake_session_manager_client,
fake_auth_policy_client); fake_authpolicy_client);
} }
AffiliationTestHelper::AffiliationTestHelper(AffiliationTestHelper&& other) = AffiliationTestHelper::AffiliationTestHelper(AffiliationTestHelper&& other) =
...@@ -100,17 +100,17 @@ AffiliationTestHelper::AffiliationTestHelper(AffiliationTestHelper&& other) = ...@@ -100,17 +100,17 @@ AffiliationTestHelper::AffiliationTestHelper(AffiliationTestHelper&& other) =
AffiliationTestHelper::AffiliationTestHelper( AffiliationTestHelper::AffiliationTestHelper(
ManagementType management_type, ManagementType management_type,
chromeos::FakeSessionManagerClient* fake_session_manager_client, chromeos::FakeSessionManagerClient* fake_session_manager_client,
chromeos::FakeAuthPolicyClient* fake_auth_policy_client) chromeos::FakeAuthPolicyClient* fake_authpolicy_client)
: management_type_(management_type), : management_type_(management_type),
fake_session_manager_client_(fake_session_manager_client), fake_session_manager_client_(fake_session_manager_client),
fake_auth_policy_client_(fake_auth_policy_client) { fake_authpolicy_client_(fake_authpolicy_client) {
DCHECK(fake_session_manager_client); DCHECK(fake_session_manager_client);
} }
void AffiliationTestHelper::CheckPreconditions() { void AffiliationTestHelper::CheckPreconditions() {
ASSERT_TRUE(fake_session_manager_client_); ASSERT_TRUE(fake_session_manager_client_);
ASSERT_TRUE(management_type_ != ManagementType::kActiveDirectory || ASSERT_TRUE(management_type_ != ManagementType::kActiveDirectory ||
fake_auth_policy_client_); fake_authpolicy_client_);
} }
void AffiliationTestHelper::SetDeviceAffiliationIDs( void AffiliationTestHelper::SetDeviceAffiliationIDs(
...@@ -133,10 +133,8 @@ void AffiliationTestHelper::SetDeviceAffiliationIDs( ...@@ -133,10 +133,8 @@ void AffiliationTestHelper::SetDeviceAffiliationIDs(
fake_session_manager_client_->set_device_policy(device_policy->GetBlob()); fake_session_manager_client_->set_device_policy(device_policy->GetBlob());
fake_session_manager_client_->OnPropertyChangeComplete(true); fake_session_manager_client_->OnPropertyChangeComplete(true);
if (management_type_ == ManagementType::kActiveDirectory) { if (management_type_ == ManagementType::kActiveDirectory)
fake_auth_policy_client_->set_device_affiliation_ids( fake_authpolicy_client_->set_device_affiliation_ids(device_affiliation_ids);
device_affiliation_ids);
}
} }
void AffiliationTestHelper::SetUserAffiliationIDs( void AffiliationTestHelper::SetUserAffiliationIDs(
...@@ -163,7 +161,7 @@ void AffiliationTestHelper::SetUserAffiliationIDs( ...@@ -163,7 +161,7 @@ void AffiliationTestHelper::SetUserAffiliationIDs(
user_policy->GetBlob()); user_policy->GetBlob());
if (management_type_ == ManagementType::kActiveDirectory) if (management_type_ == ManagementType::kActiveDirectory)
fake_auth_policy_client_->set_user_affiliation_ids(user_affiliation_ids); fake_authpolicy_client_->set_user_affiliation_ids(user_affiliation_ids);
} }
// static // static
......
...@@ -38,7 +38,7 @@ class AffiliationTestHelper { ...@@ -38,7 +38,7 @@ class AffiliationTestHelper {
// Directory accounts). The pointers must outlive this object. // Directory accounts). The pointers must outlive this object.
static AffiliationTestHelper CreateForActiveDirectory( static AffiliationTestHelper CreateForActiveDirectory(
chromeos::FakeSessionManagerClient* fake_session_manager_client, chromeos::FakeSessionManagerClient* fake_session_manager_client,
chromeos::FakeAuthPolicyClient* fake_auth_policy_client); chromeos::FakeAuthPolicyClient* fake_authpolicy_client);
// Allow move construction, so the static constructors can be used despite // Allow move construction, so the static constructors can be used despite
// DISALLOW_COPY_AND_ASSIGN. // DISALLOW_COPY_AND_ASSIGN.
...@@ -85,7 +85,7 @@ class AffiliationTestHelper { ...@@ -85,7 +85,7 @@ class AffiliationTestHelper {
AffiliationTestHelper( AffiliationTestHelper(
ManagementType management_type, ManagementType management_type,
chromeos::FakeSessionManagerClient* fake_session_manager_client, chromeos::FakeSessionManagerClient* fake_session_manager_client,
chromeos::FakeAuthPolicyClient* fake_auth_policy_client); chromeos::FakeAuthPolicyClient* fake_authpolicy_client);
// ASSERTs on pointer validity. // ASSERTs on pointer validity.
void CheckPreconditions(); void CheckPreconditions();
...@@ -93,7 +93,7 @@ class AffiliationTestHelper { ...@@ -93,7 +93,7 @@ class AffiliationTestHelper {
ManagementType management_type_; ManagementType management_type_;
chromeos::FakeSessionManagerClient* chromeos::FakeSessionManagerClient*
fake_session_manager_client_; // Not owned. fake_session_manager_client_; // Not owned.
chromeos::FakeAuthPolicyClient* fake_auth_policy_client_; // Not owned. chromeos::FakeAuthPolicyClient* fake_authpolicy_client_; // Not owned.
DISALLOW_COPY_AND_ASSIGN(AffiliationTestHelper); DISALLOW_COPY_AND_ASSIGN(AffiliationTestHelper);
}; };
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chromeos/attestation/attestation_flow.h" #include "chromeos/attestation/attestation_flow.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/dbus/cryptohome/rpc.pb.h" #include "chromeos/dbus/cryptohome/rpc.pb.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "components/policy/core/common/cloud/dm_auth.h" #include "components/policy/core/common/cloud/dm_auth.h"
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/optional.h" #include "base/optional.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_client.h" #include "components/policy/core/common/cloud/cloud_policy_client.h"
#include "components/policy/core/common/cloud/cloud_policy_constants.h" #include "components/policy/core/common/cloud/cloud_policy_constants.h"
#include "components/policy/core/common/cloud/cloud_policy_store.h" #include "components/policy/core/common/cloud/cloud_policy_store.h"
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chromeos/attestation/attestation_flow.h" #include "chromeos/attestation/attestation_flow.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/dbus/cryptohome/rpc.pb.h" #include "chromeos/dbus/cryptohome/rpc.pb.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/upstart/upstart_client.h" #include "chromeos/dbus/upstart/upstart_client.h"
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h" #include "chrome/browser/chromeos/policy/device_cloud_policy_initializer.h"
#include "chrome/browser/chromeos/policy/device_cloud_policy_validator.h" #include "chrome/browser/chromeos/policy/device_cloud_policy_validator.h"
#include "chrome/browser/chromeos/policy/enrollment_config.h" #include "chrome/browser/chromeos/policy/enrollment_config.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/dbus/constants/attestation_constants.h" #include "chromeos/dbus/constants/attestation_constants.h"
#include "chromeos/tpm/install_attributes.h" #include "chromeos/tpm/install_attributes.h"
#include "components/policy/core/common/cloud/cloud_policy_client.h" #include "components/policy/core/common/cloud/cloud_policy_client.h"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "chrome/test/base/mixin_based_in_process_browser_test.h" #include "chrome/test/base/mixin_based_in_process_browser_test.h"
#include "chromeos/constants/chromeos_switches.h" #include "chromeos/constants/chromeos_switches.h"
#include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/cryptohome/cryptohome_parameters.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "chromeos/dbus/cryptohome/cryptohome_client.h" #include "chromeos/dbus/cryptohome/cryptohome_client.h"
#include "chromeos/dbus/dbus_thread_manager.h" #include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/session_manager/fake_session_manager_client.h" #include "chromeos/dbus/session_manager/fake_session_manager_client.h"
...@@ -159,11 +159,11 @@ class UserAffiliationBrowserTest ...@@ -159,11 +159,11 @@ class UserAffiliationBrowserTest
// shutdown in ChromeBrowserMain. // shutdown in ChromeBrowserMain.
chromeos::SessionManagerClient::InitializeFakeInMemory(); chromeos::SessionManagerClient::InitializeFakeInMemory();
chromeos::UpstartClient::InitializeFake(); chromeos::UpstartClient::InitializeFake();
chromeos::FakeAuthPolicyClient* fake_auth_policy_client = nullptr; chromeos::FakeAuthPolicyClient* fake_authpolicy_client = nullptr;
if (GetParam().active_directory) { if (GetParam().active_directory) {
chromeos::AuthPolicyClient::InitializeFake(); chromeos::AuthPolicyClient::InitializeFake();
fake_auth_policy_client = chromeos::FakeAuthPolicyClient::Get(); fake_authpolicy_client = chromeos::FakeAuthPolicyClient::Get();
fake_auth_policy_client->DisableOperationDelayForTesting(); fake_authpolicy_client->DisableOperationDelayForTesting();
} }
DevicePolicyCrosTestHelper test_helper; DevicePolicyCrosTestHelper test_helper;
...@@ -176,7 +176,7 @@ class UserAffiliationBrowserTest ...@@ -176,7 +176,7 @@ class UserAffiliationBrowserTest
AffiliationTestHelper affiliation_helper = AffiliationTestHelper affiliation_helper =
GetParam().active_directory GetParam().active_directory
? AffiliationTestHelper::CreateForActiveDirectory( ? AffiliationTestHelper::CreateForActiveDirectory(
session_manager_client, fake_auth_policy_client) session_manager_client, fake_authpolicy_client)
: AffiliationTestHelper::CreateForCloud(session_manager_client); : AffiliationTestHelper::CreateForCloud(session_manager_client);
ASSERT_NO_FATAL_FAILURE(affiliation_helper.SetDeviceAffiliationIDs( ASSERT_NO_FATAL_FAILURE(affiliation_helper.SetDeviceAffiliationIDs(
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
#include <memory> #include <memory>
#include "base/time/default_tick_clock.h" #include "base/time/default_tick_clock.h"
#include "chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h" #include "chrome/browser/chromeos/authpolicy/authpolicy_credentials_manager.h"
#include "chrome/browser/chromeos/file_system_provider/service_factory.h" #include "chrome/browser/chromeos/file_system_provider/service_factory.h"
#include "chrome/browser/chromeos/profiles/profile_helper.h" #include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/chromeos/smb_client/smb_service.h" #include "chrome/browser/chromeos/smb_client/smb_service.h"
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
#include "chrome/browser/chromeos/android_sms/android_sms_pairing_state_tracker_impl.h" #include "chrome/browser/chromeos/android_sms/android_sms_pairing_state_tracker_impl.h"
#include "chrome/browser/chromeos/android_sms/android_sms_service_factory.h" #include "chrome/browser/chromeos/android_sms/android_sms_service_factory.h"
#include "chrome/browser/chromeos/arc/session/arc_service_launcher.h" #include "chrome/browser/chromeos/arc/session/arc_service_launcher.h"
#include "chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h" #include "chrome/browser/chromeos/authpolicy/authpolicy_credentials_manager.h"
#include "chrome/browser/chromeos/cryptauth/gcm_device_info_provider_impl.h" #include "chrome/browser/chromeos/cryptauth/gcm_device_info_provider_impl.h"
#include "chrome/browser/chromeos/device_sync/device_sync_client_factory.h" #include "chrome/browser/chromeos/device_sync/device_sync_client_factory.h"
#include "chrome/browser/chromeos/locale_change_guard.h" #include "chrome/browser/chromeos/locale_change_guard.h"
......
...@@ -209,7 +209,7 @@ source_set("unit_tests") { ...@@ -209,7 +209,7 @@ source_set("unit_tests") {
"//base", "//base",
"//base/test:test_support", "//base/test:test_support",
"//chromeos/dbus/audio", "//chromeos/dbus/audio",
"//chromeos/dbus/auth_policy", "//chromeos/dbus/authpolicy",
"//chromeos/dbus/biod:test_support", "//chromeos/dbus/biod:test_support",
"//chromeos/dbus/cryptohome", "//chromeos/dbus/cryptohome",
"//chromeos/dbus/cryptohome:attestation_proto", "//chromeos/dbus/cryptohome:attestation_proto",
...@@ -228,7 +228,7 @@ source_set("unit_tests") { ...@@ -228,7 +228,7 @@ source_set("unit_tests") {
] ]
sources = [ sources = [
"audio/cras_audio_client_unittest.cc", "audio/cras_audio_client_unittest.cc",
"auth_policy/fake_auth_policy_client_unittest.cc", "authpolicy/fake_authpolicy_client_unittest.cc",
"biod/biod_client_unittest.cc", "biod/biod_client_unittest.cc",
"biod/fake_biod_client_unittest.cc", "biod/fake_biod_client_unittest.cc",
"blocking_method_caller_unittest.cc", "blocking_method_caller_unittest.cc",
......
...@@ -6,8 +6,8 @@ import("//third_party/protobuf/proto_library.gni") ...@@ -6,8 +6,8 @@ import("//third_party/protobuf/proto_library.gni")
assert(is_chromeos, "Non-Chrome-OS builds cannot depend on //chromeos") assert(is_chromeos, "Non-Chrome-OS builds cannot depend on //chromeos")
component("auth_policy") { component("authpolicy") {
defines = [ "IS_AUTH_POLICY_IMPL" ] defines = [ "IS_AUTHPOLICY_IMPL" ]
deps = [ deps = [
":authpolicy_proto", ":authpolicy_proto",
...@@ -25,10 +25,10 @@ component("auth_policy") { ...@@ -25,10 +25,10 @@ component("auth_policy") {
] ]
sources = [ sources = [
"auth_policy_client.cc", "authpolicy_client.cc",
"auth_policy_client.h", "authpolicy_client.h",
"fake_auth_policy_client.cc", "fake_authpolicy_client.cc",
"fake_auth_policy_client.h", "fake_authpolicy_client.h",
] ]
} }
...@@ -37,5 +37,5 @@ proto_library("authpolicy_proto") { ...@@ -37,5 +37,5 @@ proto_library("authpolicy_proto") {
"//third_party/cros_system_api/dbus/authpolicy/active_directory_info.proto", "//third_party/cros_system_api/dbus/authpolicy/active_directory_info.proto",
] ]
proto_out_dir = "chromeos/dbus/auth_policy" proto_out_dir = "chromeos/dbus/authpolicy"
} }
specific_include_rules = { specific_include_rules = {
"fake_auth_policy_client.*\.cc": [ "fake_authpolicy_client.*\.cc": [
"+chromeos/tpm", "+chromeos/tpm",
], ],
} }
// Copyright 2016 The Chromium Authors. All rights reserved. // Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include <utility> #include <utility>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#include "base/location.h" #include "base/location.h"
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "components/account_id/account_id.h" #include "components/account_id/account_id.h"
#include "dbus/bus.h" #include "dbus/bus.h"
#include "dbus/message.h" #include "dbus/message.h"
......
...@@ -2,14 +2,14 @@ ...@@ -2,14 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROMEOS_DBUS_AUTH_POLICY_AUTH_POLICY_CLIENT_H_ #ifndef CHROMEOS_DBUS_AUTHPOLICY_AUTHPOLICY_CLIENT_H_
#define CHROMEOS_DBUS_AUTH_POLICY_AUTH_POLICY_CLIENT_H_ #define CHROMEOS_DBUS_AUTHPOLICY_AUTHPOLICY_CLIENT_H_
#include <string> #include <string>
#include "base/callback.h" #include "base/callback.h"
#include "base/component_export.h" #include "base/component_export.h"
#include "chromeos/dbus/auth_policy/active_directory_info.pb.h" #include "chromeos/dbus/authpolicy/active_directory_info.pb.h"
#include "dbus/object_proxy.h" #include "dbus/object_proxy.h"
#include "third_party/cros_system_api/dbus/service_constants.h" #include "third_party/cros_system_api/dbus/service_constants.h"
...@@ -20,7 +20,7 @@ namespace chromeos { ...@@ -20,7 +20,7 @@ namespace chromeos {
// AuthPolicyClient is used to communicate with the org.chromium.AuthPolicy // AuthPolicyClient is used to communicate with the org.chromium.AuthPolicy
// sevice. All method should be called from the origin thread (UI thread) which // sevice. All method should be called from the origin thread (UI thread) which
// initializes the DBusThreadManager instance. // initializes the DBusThreadManager instance.
class COMPONENT_EXPORT(AUTH_POLICY) AuthPolicyClient { class COMPONENT_EXPORT(AUTHPOLICY) AuthPolicyClient {
public: public:
using AuthCallback = base::OnceCallback<void( using AuthCallback = base::OnceCallback<void(
authpolicy::ErrorType error, authpolicy::ErrorType error,
...@@ -106,4 +106,4 @@ class COMPONENT_EXPORT(AUTH_POLICY) AuthPolicyClient { ...@@ -106,4 +106,4 @@ class COMPONENT_EXPORT(AUTH_POLICY) AuthPolicyClient {
} // namespace chromeos } // namespace chromeos
#endif // CHROMEOS_DBUS_AUTH_POLICY_AUTH_POLICY_CLIENT_H_ #endif // CHROMEOS_DBUS_AUTHPOLICY_AUTHPOLICY_CLIENT_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include <memory> #include <memory>
#include <vector> #include <vector>
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CHROMEOS_DBUS_AUTH_POLICY_FAKE_AUTH_POLICY_CLIENT_H_ #ifndef CHROMEOS_DBUS_AUTHPOLICY_FAKE_AUTHPOLICY_CLIENT_H_
#define CHROMEOS_DBUS_AUTH_POLICY_FAKE_AUTH_POLICY_CLIENT_H_ #define CHROMEOS_DBUS_AUTHPOLICY_FAKE_AUTHPOLICY_CLIENT_H_
#include <set> #include <set>
#include <string> #include <string>
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "base/optional.h" #include "base/optional.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chromeos/dbus/auth_policy/auth_policy_client.h" #include "chromeos/dbus/authpolicy/authpolicy_client.h"
#include "chromeos/dbus/session_manager/session_manager_client.h" #include "chromeos/dbus/session_manager/session_manager_client.h"
#include "components/policy/proto/chrome_device_policy.pb.h" #include "components/policy/proto/chrome_device_policy.pb.h"
#include "components/policy/proto/device_management_backend.pb.h" #include "components/policy/proto/device_management_backend.pb.h"
...@@ -23,7 +23,7 @@ class AccountId; ...@@ -23,7 +23,7 @@ class AccountId;
namespace chromeos { namespace chromeos {
class COMPONENT_EXPORT(AUTH_POLICY) FakeAuthPolicyClient class COMPONENT_EXPORT(AUTHPOLICY) FakeAuthPolicyClient
: public AuthPolicyClient { : public AuthPolicyClient {
public: public:
FakeAuthPolicyClient(); FakeAuthPolicyClient();
...@@ -185,4 +185,4 @@ class COMPONENT_EXPORT(AUTH_POLICY) FakeAuthPolicyClient ...@@ -185,4 +185,4 @@ class COMPONENT_EXPORT(AUTH_POLICY) FakeAuthPolicyClient
} // namespace chromeos } // namespace chromeos
#endif // CHROMEOS_DBUS_AUTH_POLICY_FAKE_AUTH_POLICY_CLIENT_H_ #endif // CHROMEOS_DBUS_AUTHPOLICY_FAKE_AUTHPOLICY_CLIENT_H_
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "base/bind.h" #include "base/bind.h"
#include "base/run_loop.h" #include "base/run_loop.h"
......
...@@ -10,8 +10,8 @@ component("upstart") { ...@@ -10,8 +10,8 @@ component("upstart") {
deps = [ deps = [
"//base", "//base",
"//chromeos/dbus:common", "//chromeos/dbus:common",
"//chromeos/dbus/auth_policy", "//chromeos/dbus/authpolicy",
"//chromeos/dbus/auth_policy:authpolicy_proto", "//chromeos/dbus/authpolicy:authpolicy_proto",
"//chromeos/dbus/kerberos", "//chromeos/dbus/kerberos",
"//chromeos/dbus/media_analytics", "//chromeos/dbus/media_analytics",
"//dbus", "//dbus",
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "chromeos/dbus/auth_policy/fake_auth_policy_client.h" #include "chromeos/dbus/authpolicy/fake_authpolicy_client.h"
#include "chromeos/dbus/kerberos/fake_kerberos_client.h" #include "chromeos/dbus/kerberos/fake_kerberos_client.h"
#include "chromeos/dbus/kerberos/kerberos_client.h" #include "chromeos/dbus/kerberos/kerberos_client.h"
#include "chromeos/dbus/media_analytics/fake_media_analytics_client.h" #include "chromeos/dbus/media_analytics/fake_media_analytics_client.h"
......
...@@ -17,8 +17,8 @@ component("auth") { ...@@ -17,8 +17,8 @@ component("auth") {
"//base:i18n", "//base:i18n",
"//chromeos/constants", "//chromeos/constants",
"//chromeos/cryptohome", "//chromeos/cryptohome",
"//chromeos/dbus/auth_policy", "//chromeos/dbus/authpolicy",
"//chromeos/dbus/auth_policy:authpolicy_proto", "//chromeos/dbus/authpolicy:authpolicy_proto",
"//chromeos/dbus/constants", "//chromeos/dbus/constants",
"//chromeos/dbus/cryptohome", "//chromeos/dbus/cryptohome",
"//chromeos/dbus/cryptohome:cryptohome_proto", "//chromeos/dbus/cryptohome:cryptohome_proto",
...@@ -126,8 +126,8 @@ source_set("unit_tests") { ...@@ -126,8 +126,8 @@ source_set("unit_tests") {
":auth", ":auth",
"//base", "//base",
"//base:i18n", "//base:i18n",
"//chromeos/dbus/auth_policy", "//chromeos/dbus/authpolicy",
"//chromeos/dbus/auth_policy:authpolicy_proto", "//chromeos/dbus/authpolicy:authpolicy_proto",
"//chromeos/dbus/cryptohome", "//chromeos/dbus/cryptohome",
"//chromeos/tpm:test_support", "//chromeos/tpm:test_support",
"//components/prefs", "//components/prefs",
......
...@@ -52,14 +52,14 @@ is necessary to get the latest policies. ...@@ -52,14 +52,14 @@ is necessary to get the latest policies.
## Chrome Architecture ## Chrome Architecture
The following Chrome classes are most relevant for the AD integration: The following Chrome classes are most relevant for the AD integration:
[AuthPolicyClient](https://cs.chromium.org/chromium/src/chromeos/dbus/auth_policy/auth_policy_client.h) [AuthPolicyClient](https://cs.chromium.org/chromium/src/chromeos/dbus/authpolicy/authpolicy_client.h)
is the D-Bus client for the authpolicy daemon. All authpolicy D-Bus calls are is the D-Bus client for the authpolicy daemon. All authpolicy D-Bus calls are
routed through it. The routed through it. The
[AuthPolicyHelper](https://cs.chromium.org/chromium/src/chrome/browser/chromeos/authpolicy/authpolicy_helper.h) [AuthPolicyHelper](https://cs.chromium.org/chromium/src/chrome/browser/chromeos/authpolicy/authpolicy_helper.h)
is a thin abstraction layer on top of the is a thin abstraction layer on top of the
[AuthPolicyClient](https://cs.chromium.org/chromium/src/chromeos/dbus/auth_policy/auth_policy_client.h) [AuthPolicyClient](https://cs.chromium.org/chromium/src/chromeos/dbus/authpolicy/authpolicy_client.h)
to handle cancellation and other stuff. The to handle cancellation and other stuff. The
[AuthPolicyCredentialsManager](https://cs.chromium.org/chromium/src/chrome/browser/chromeos/authpolicy/auth_policy_credentials_manager.h) [AuthPolicyCredentialsManager](https://cs.chromium.org/chromium/src/chrome/browser/chromeos/authpolicy/authpolicy_credentials_manager.h)
keeps track of user credential status, shows notifications if the Kerberos keeps track of user credential status, shows notifications if the Kerberos
ticket expires and handles network connection changes. The ticket expires and handles network connection changes. The
[ActiveDirectoryPolicyManager](https://cs.chromium.org/chromium/src/chrome/browser/chromeos/policy/active_directory_policy_manager.h) [ActiveDirectoryPolicyManager](https://cs.chromium.org/chromium/src/chrome/browser/chromeos/policy/active_directory_policy_manager.h)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment