Move chrome/browser/ash/login/saml/ to namespace ash

The migration of chromeos/browser/chromeos/login/saml/ was finished in
https://crrev.com/c/2721766. This CL changes the namespace from chromeos
to ash. Compatibility code is added until the Chrome OS source code
migration is finished.

This CL is part of the Chrome OS source code directory migration:
https://docs.google.com/document/d/1g-98HpzA8XcoGBWUv1gQNr4rbnD5yfvbtYZyPDDbkaE.

Bug: 1164001
Change-Id: I2d5125a1ba94f47dcc4dbc88c532de7a05cabc84
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3035172
Reviewed-by: Hidehiko Abe <hidehiko@chromium.org>
Owners-Override: Hidehiko Abe <hidehiko@chromium.org>
Commit-Queue: Henrique Ferreiro <hferreiro@igalia.com>
Cr-Commit-Position: refs/heads/master@{#903376}
diff --git a/chrome/browser/ash/login/login_constants.h b/chrome/browser/ash/login/login_constants.h
index d18e99bb..b862a957 100644
--- a/chrome/browser/ash/login/login_constants.h
+++ b/chrome/browser/ash/login/login_constants.h
@@ -46,4 +46,18 @@
 
 }  // namespace chromeos
 
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+namespace constants {
+using ::chromeos::constants::kDefaultGaiaLockScreenOfflineSigninTimeLimitDays;
+using ::chromeos::constants::kDefaultGaiaOfflineSigninTimeLimitDays;
+using ::chromeos::constants::kDefaultLockScreenReauthenticationEnabled;
+using ::chromeos::constants::kDefaultSAMLOfflineSigninTimeLimit;
+using ::chromeos::constants::kDefaultSamlPasswordExpirationAdvanceWarningDays;
+using ::chromeos::constants::kDefaultSamlInSessionPasswordChangeEnabled;
+using ::chromeos::constants::kDefaultSamlLockScreenOfflineSigninTimeLimitDays;
+}  // namespace constants
+}  // namespace ash
+
 #endif  // CHROME_BROWSER_ASH_LOGIN_LOGIN_CONSTANTS_H_
diff --git a/chrome/browser/ash/login/login_pref_names.h b/chrome/browser/ash/login/login_pref_names.h
index 7fc3519..d0423d3 100644
--- a/chrome/browser/ash/login/login_pref_names.h
+++ b/chrome/browser/ash/login/login_pref_names.h
@@ -35,10 +35,20 @@
 // source migration is finished.
 namespace ash {
 namespace prefs {
+using ::chromeos::prefs::kGaiaLastOnlineSignInTime;
+using ::chromeos::prefs::kGaiaLockScreenOfflineSigninTimeLimitDays;
+using ::chromeos::prefs::kGaiaOfflineSigninTimeLimitDays;
+using ::chromeos::prefs::kLockScreenReauthenticationEnabled;
 using ::chromeos::prefs::kOobeMarketingOptInChoice;
 using ::chromeos::prefs::kOobeMarketingOptInScreenFinished;
 using ::chromeos::prefs::kOobeOnboardingTime;
 using ::chromeos::prefs::kOobeScreenPending;
+using ::chromeos::prefs::kSAMLLastGAIASignInTime;
+using ::chromeos::prefs::kSAMLOfflineSigninTimeLimit;
+using ::chromeos::prefs::kSamlInSessionPasswordChangeEnabled;
+using ::chromeos::prefs::kSamlLockScreenOfflineSigninTimeLimitDays;
+using ::chromeos::prefs::kSamlPasswordExpirationAdvanceWarningDays;
+using ::chromeos::prefs::kSamlPasswordSyncToken;
 }
 }  // namespace ash
 
diff --git a/chrome/browser/ash/login/saml/fake_saml_idp_mixin.cc b/chrome/browser/ash/login/saml/fake_saml_idp_mixin.cc
index 259efda3..9614dc95 100644
--- a/chrome/browser/ash/login/saml/fake_saml_idp_mixin.cc
+++ b/chrome/browser/ash/login/saml/fake_saml_idp_mixin.cc
@@ -18,14 +18,13 @@
 #include "net/base/url_util.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-using net::test_server::BasicHttpResponse;
-using net::test_server::HttpRequest;
-using net::test_server::HttpResponse;
-
-namespace chromeos {
-
+namespace ash {
 namespace {
 
+using ::net::test_server::BasicHttpResponse;
+using ::net::test_server::HttpRequest;
+using ::net::test_server::HttpResponse;
+
 // The header that the server returns in a HTTP response to ask the client to
 // authenticate.
 constexpr char kAuthenticateResponseHeader[] = "WWW-Authenticate";
@@ -346,4 +345,4 @@
   challenge_response_.reset();
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/fake_saml_idp_mixin.h b/chrome/browser/ash/login/saml/fake_saml_idp_mixin.h
index 2b7c59939..3466001 100644
--- a/chrome/browser/ash/login/saml/fake_saml_idp_mixin.h
+++ b/chrome/browser/ash/login/saml/fake_saml_idp_mixin.h
@@ -9,18 +9,17 @@
 #include <string>
 
 #include "base/files/file_path.h"
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chrome/browser/ash/login/test/fake_gaia_mixin.h"
+#include "chrome/test/base/mixin_based_in_process_browser_test.h"
 #include "chromeos/dbus/dbus_method_call_status.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
-#include "third_party/abseil-cpp/absl/types/optional.h"
-
-#include "chrome/test/base/mixin_based_in_process_browser_test.h"
 #include "net/test/embedded_test_server/http_request.h"
 #include "net/test/embedded_test_server/http_response.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
 #include "url/gurl.h"
 
-namespace chromeos {
-
-class FakeGaiaMixin;
+namespace ash {
 
 class FakeSamlIdpMixin final : public InProcessBrowserTestMixin {
  public:
@@ -111,6 +110,6 @@
   absl::optional<std::string> challenge_response_;
 };
 
-}  // namespace chromeos
+}  // namespace ash
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_FAKE_SAML_IDP_MIXIN_H_
diff --git a/chrome/browser/ash/login/saml/in_session_password_change_manager.cc b/chrome/browser/ash/login/saml/in_session_password_change_manager.cc
index d9d6ad6..a182583 100644
--- a/chrome/browser/ash/login/saml/in_session_password_change_manager.cc
+++ b/chrome/browser/ash/login/saml/in_session_password_change_manager.cc
@@ -29,8 +29,7 @@
 #include "content/public/browser/browser_thread.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
 
 using PasswordSource = InSessionPasswordChangeManager::PasswordSource;
@@ -197,7 +196,7 @@
   DCHECK(primary_user_);
 
   // Add `this` as a SessionActivationObserver to see when the screen is locked.
-  auto* session_controller = ash::SessionController::Get();
+  auto* session_controller = SessionController::Get();
   if (session_controller) {
     session_controller->AddSessionActivationObserverForAccountId(
         primary_user_->GetAccountId(), this);
@@ -206,7 +205,7 @@
 
 InSessionPasswordChangeManager::~InSessionPasswordChangeManager() {
   // Remove `this` as a SessionActivationObserver.
-  auto* session_controller = ash::SessionController::Get();
+  auto* session_controller = SessionController::Get();
   if (session_controller) {
     session_controller->RemoveSessionActivationObserverForAccountId(
         primary_user_->GetAccountId(), this);
@@ -413,7 +412,7 @@
   DismissExpiryNotification();
   PasswordChangeDialog::Dismiss();
   ConfirmPasswordChangeDialog::Dismiss();
-  if (ash::features::IsSamlNotificationOnPasswordChangeSuccessEnabled()) {
+  if (features::IsSamlNotificationOnPasswordChangeSuccessEnabled()) {
     PasswordChangeSuccessNotification::Show(primary_profile_);
   }
   // We request a new sync token. It will be updated locally and signal the fact
@@ -478,4 +477,4 @@
   }
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/in_session_password_change_manager.h b/chrome/browser/ash/login/saml/in_session_password_change_manager.h
index 3362766fd..bc1585b 100644
--- a/chrome/browser/ash/login/saml/in_session_password_change_manager.h
+++ b/chrome/browser/ash/login/saml/in_session_password_change_manager.h
@@ -14,6 +14,10 @@
 #include "base/time/time.h"
 #include "chrome/browser/ash/login/saml/password_sync_token_fetcher.h"
 #include "chromeos/login/auth/auth_status_consumer.h"
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chromeos/login/auth/cryptohome_authenticator.h"
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chromeos/login/auth/user_context.h"
 
 class Profile;
 
@@ -21,9 +25,7 @@
 class User;
 }
 
-namespace chromeos {
-class CryptohomeAuthenticator;
-class UserContext;
+namespace ash {
 
 // There is at most one instance of this task, which is part of the
 // InSessionPasswordChangeManager singleton. Having a separate class means that
@@ -61,7 +63,7 @@
 // feature is enabled).
 class InSessionPasswordChangeManager
     : public AuthStatusConsumer,
-      public ash::SessionActivationObserver,
+      public SessionActivationObserver,
       public PasswordSyncTokenFetcher::Consumer {
  public:
   // Events in the in-session SAML password change flow.
@@ -162,7 +164,7 @@
   void OnPasswordChangeDetected(const UserContext& user_context) override;
   void OnAuthSuccess(const UserContext& user_context) override;
 
-  // ash::SessionActivationObserver
+  // SessionActivationObserver
   void OnSessionActivated(bool activated) override;
   void OnLockStateChanged(bool locked) override;
 
@@ -193,6 +195,12 @@
   DISALLOW_COPY_AND_ASSIGN(InSessionPasswordChangeManager);
 };
 
-}  // namespace chromeos
+}  // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+using ::ash::InSessionPasswordChangeManager;
+}
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_IN_SESSION_PASSWORD_CHANGE_MANAGER_H_
diff --git a/chrome/browser/ash/login/saml/in_session_password_change_manager_unittest.cc b/chrome/browser/ash/login/saml/in_session_password_change_manager_unittest.cc
index 265fd5d..00158aed 100644
--- a/chrome/browser/ash/login/saml/in_session_password_change_manager_unittest.cc
+++ b/chrome/browser/ash/login/saml/in_session_password_change_manager_unittest.cc
@@ -24,12 +24,11 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-using message_center::Notification;
-
-namespace chromeos {
-
+namespace ash {
 namespace {
 
+using ::message_center::Notification;
+
 constexpr base::TimeDelta kOneHour = base::TimeDelta::FromHours(1);
 constexpr base::TimeDelta kOneDay = base::TimeDelta::FromDays(1);
 constexpr base::TimeDelta kAdvanceWarningTime = base::TimeDelta::FromDays(14);
@@ -304,4 +303,4 @@
   EXPECT_TRUE(Notification().has_value());
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/in_session_password_sync_manager.cc b/chrome/browser/ash/login/saml/in_session_password_sync_manager.cc
index 1de1747..80174ec 100644
--- a/chrome/browser/ash/login/saml/in_session_password_sync_manager.cc
+++ b/chrome/browser/ash/login/saml/in_session_password_sync_manager.cc
@@ -26,7 +26,7 @@
 #include "components/user_manager/user_manager_base.h"
 #include "content/public/browser/storage_partition.h"
 
-namespace chromeos {
+namespace ash {
 
 InSessionPasswordSyncManager::InSessionPasswordSyncManager(
     Profile* primary_profile)
@@ -285,4 +285,4 @@
   return lock_screen_start_reauth_dialog_->GetDialogWidth();
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/in_session_password_sync_manager.h b/chrome/browser/ash/login/saml/in_session_password_sync_manager.h
index b93b66a..e47d714b 100644
--- a/chrome/browser/ash/login/saml/in_session_password_sync_manager.h
+++ b/chrome/browser/ash/login/saml/in_session_password_sync_manager.h
@@ -14,6 +14,10 @@
 #include "chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.h"
 #include "chromeos/components/proximity_auth/screenlock_bridge.h"
 #include "chromeos/login/auth/auth_status_consumer.h"
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chromeos/login/auth/cryptohome_authenticator.h"
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chromeos/login/auth/extended_authenticator.h"
 #include "chromeos/login/auth/user_context.h"
 #include "components/account_id/account_id.h"
 #include "components/keyed_service/core/keyed_service.h"
@@ -24,11 +28,9 @@
 class User;
 }
 
-namespace chromeos {
-class CryptohomeAuthenticator;
-class ExtendedAuthenticator;
+namespace ash {
 
-using PasswordChangedCallback = base::RepeatingClosure;
+using PasswordChangedCallback = ::base::RepeatingClosure;
 
 // Manages SAML password sync for multiple customer devices. Handles online
 // re-auth requests triggered by online signin policy or by checking validity
@@ -150,6 +152,12 @@
   base::WeakPtrFactory<InSessionPasswordSyncManager> weak_factory_{this};
 };
 
-}  // namespace chromeos
+}  // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+using ::ash::InSessionPasswordSyncManager;
+}
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_IN_SESSION_PASSWORD_SYNC_MANAGER_H_
diff --git a/chrome/browser/ash/login/saml/in_session_password_sync_manager_factory.cc b/chrome/browser/ash/login/saml/in_session_password_sync_manager_factory.cc
index 59e5d93..884d8386 100644
--- a/chrome/browser/ash/login/saml/in_session_password_sync_manager_factory.cc
+++ b/chrome/browser/ash/login/saml/in_session_password_sync_manager_factory.cc
@@ -14,7 +14,7 @@
 #include "components/user_manager/user_manager.h"
 #include "content/public/browser/browser_context.h"
 
-namespace chromeos {
+namespace ash {
 
 // static
 InSessionPasswordSyncManagerFactory*
@@ -25,7 +25,7 @@
 // static
 InSessionPasswordSyncManager*
 InSessionPasswordSyncManagerFactory::GetForProfile(Profile* profile) {
-  if (!ash::features::IsSamlReauthenticationOnLockscreenEnabled())
+  if (!features::IsSamlReauthenticationOnLockscreenEnabled())
     return nullptr;
 
   return static_cast<InSessionPasswordSyncManager*>(
@@ -51,4 +51,4 @@
   return new InSessionPasswordSyncManager(profile);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/in_session_password_sync_manager_factory.h b/chrome/browser/ash/login/saml/in_session_password_sync_manager_factory.h
index 5ad8a7a..034b67a 100644
--- a/chrome/browser/ash/login/saml/in_session_password_sync_manager_factory.h
+++ b/chrome/browser/ash/login/saml/in_session_password_sync_manager_factory.h
@@ -12,8 +12,7 @@
 
 class Profile;
 
-namespace chromeos {
-
+namespace ash {
 class InSessionPasswordSyncManager;
 
 // Singleton that owns all InSessionPasswordSyncManagers and associates them
@@ -37,6 +36,12 @@
       content::BrowserContext* context) const override;
 };
 
-}  // namespace chromeos
+}  // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+using ::ash::InSessionPasswordSyncManagerFactory;
+}
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_IN_SESSION_PASSWORD_SYNC_MANAGER_FACTORY_H_
diff --git a/chrome/browser/ash/login/saml/in_session_password_sync_manager_unittest.cc b/chrome/browser/ash/login/saml/in_session_password_sync_manager_unittest.cc
index b2731e8..cb58d7d 100644
--- a/chrome/browser/ash/login/saml/in_session_password_sync_manager_unittest.cc
+++ b/chrome/browser/ash/login/saml/in_session_password_sync_manager_unittest.cc
@@ -21,8 +21,7 @@
 #include "components/user_manager/user_names.h"
 #include "content/public/test/browser_task_environment.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
 
 const char kSAMLUserId1[] = "12345";
@@ -311,4 +310,4 @@
   EXPECT_FALSE(manager_->IsLockReauthEnabled());
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/mock_lock_handler.cc b/chrome/browser/ash/login/saml/mock_lock_handler.cc
index 792190f8..89d8afe3 100644
--- a/chrome/browser/ash/login/saml/mock_lock_handler.cc
+++ b/chrome/browser/ash/login/saml/mock_lock_handler.cc
@@ -4,10 +4,10 @@
 
 #include "chrome/browser/ash/login/saml/mock_lock_handler.h"
 
-namespace chromeos {
+namespace ash {
 
 MockLockHandler::MockLockHandler() = default;
 
 MockLockHandler::~MockLockHandler() = default;
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/mock_lock_handler.h b/chrome/browser/ash/login/saml/mock_lock_handler.h
index d13030a..d576fbf 100644
--- a/chrome/browser/ash/login/saml/mock_lock_handler.h
+++ b/chrome/browser/ash/login/saml/mock_lock_handler.h
@@ -11,7 +11,7 @@
 #include "chromeos/components/proximity_auth/screenlock_bridge.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace chromeos {
+namespace ash {
 
 // Mock implementation of proximity_auth::ScreenlockBridge::LockHandler.
 class MockLockHandler : public proximity_auth::ScreenlockBridge::LockHandler {
@@ -48,6 +48,6 @@
                const std::string& key_label));
 };
 
-}  // namespace chromeos
+}  // namespace ash
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_MOCK_LOCK_HANDLER_H_
diff --git a/chrome/browser/ash/login/saml/password_change_extension_browsertest.cc b/chrome/browser/ash/login/saml/password_change_extension_browsertest.cc
index 554eb10..d2ec404 100644
--- a/chrome/browser/ash/login/saml/password_change_extension_browsertest.cc
+++ b/chrome/browser/ash/login/saml/password_change_extension_browsertest.cc
@@ -17,12 +17,12 @@
 #include "net/test/embedded_test_server/http_request.h"
 #include "net/test/embedded_test_server/http_response.h"
 
-using net::test_server::BasicHttpResponse;
-using net::test_server::HttpMethod;
-using net::test_server::HttpRequest;
-using net::test_server::HttpResponse;
+namespace ash {
 
-namespace chromeos {
+using ::net::test_server::BasicHttpResponse;
+using ::net::test_server::HttpMethod;
+using ::net::test_server::HttpRequest;
+using ::net::test_server::HttpResponse;
 
 constexpr char kPasswordChangePageTemplate[] =
     R"(<html><body onload='document.forms[0].submit();'>
@@ -221,4 +221,4 @@
   WaitForPasswordChangeDetected();
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_change_success_detection_browsertest.cc b/chrome/browser/ash/login/saml/password_change_success_detection_browsertest.cc
index 1b5a139..c9ea8c60 100644
--- a/chrome/browser/ash/login/saml/password_change_success_detection_browsertest.cc
+++ b/chrome/browser/ash/login/saml/password_change_success_detection_browsertest.cc
@@ -17,12 +17,12 @@
 #include "net/test/embedded_test_server/http_request.h"
 #include "net/test/embedded_test_server/http_response.h"
 
-using net::test_server::BasicHttpResponse;
-using net::test_server::HttpMethod;
-using net::test_server::HttpRequest;
-using net::test_server::HttpResponse;
+namespace ash {
 
-namespace chromeos {
+using ::net::test_server::BasicHttpResponse;
+using ::net::test_server::HttpMethod;
+using ::net::test_server::HttpRequest;
+using ::net::test_server::HttpResponse;
 
 constexpr char kPasswordChangePageTemplate[] =
     "<html><body onload='document.forms[0].submit();'>"
@@ -207,4 +207,4 @@
   WaitForPasswordChangeDetected();
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_change_success_notification.cc b/chrome/browser/ash/login/saml/password_change_success_notification.cc
index b09ff84..29e20ea 100644
--- a/chrome/browser/ash/login/saml/password_change_success_notification.cc
+++ b/chrome/browser/ash/login/saml/password_change_success_notification.cc
@@ -19,18 +19,17 @@
 #include "ui/message_center/public/cpp/notification.h"
 #include "ui/message_center/public/cpp/notification_delegate.h"
 
-using message_center::Notification;
-using message_center::NotificationDelegate;
-using message_center::NotificationType;
-using message_center::NotifierId;
-using message_center::NotifierType;
-using message_center::RichNotificationData;
-using message_center::SystemNotificationWarningLevel;
-
-namespace chromeos {
-
+namespace ash {
 namespace {
 
+using ::message_center::Notification;
+using ::message_center::NotificationDelegate;
+using ::message_center::NotificationType;
+using ::message_center::NotifierId;
+using ::message_center::NotifierType;
+using ::message_center::RichNotificationData;
+using ::message_center::SystemNotificationWarningLevel;
+
 // Unique ID for this notification.
 const char kNotificationId[] = "saml.password-change-success-notification";
 
@@ -57,7 +56,7 @@
 
   // NotifierId for histogram reporting.
   static const base::NoDestructor<NotifierId> kNotifierId(
-      message_center::NotifierType::SYSTEM_COMPONENT, kNotificationId);
+      NotifierType::SYSTEM_COMPONENT, kNotificationId);
 
   // Leaving this empty means the notification is attributed to the system -
   // ie "Chromium OS" or similar.
@@ -74,10 +73,10 @@
 
   RichNotificationData rich_notification_data;
 
-  const scoped_refptr<message_center::NotificationDelegate> delegate =
-      base::MakeRefCounted<message_center::NotificationDelegate>();
+  const scoped_refptr<NotificationDelegate> delegate =
+      base::MakeRefCounted<NotificationDelegate>();
 
-  std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
+  std::unique_ptr<Notification> notification = CreateSystemNotification(
       kNotificationType, kNotificationId, title, body, *kEmptyDisplaySource,
       *kEmptyOriginUrl, *kNotifierId, rich_notification_data, delegate, kIcon,
       kWarningLevel);
@@ -90,4 +89,4 @@
   nds->Display(kNotificationHandlerType, *notification, /*metadata=*/nullptr);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_change_success_notification.h b/chrome/browser/ash/login/saml/password_change_success_notification.h
index 52c3882..27fce742 100644
--- a/chrome/browser/ash/login/saml/password_change_success_notification.h
+++ b/chrome/browser/ash/login/saml/password_change_success_notification.h
@@ -11,7 +11,7 @@
 
 class Profile;
 
-namespace chromeos {
+namespace ash {
 
 // Utility functions to show a password change success notification.
 class PasswordChangeSuccessNotification {
@@ -20,6 +20,6 @@
   static void Show(Profile* profile);
 };
 
-}  // namespace chromeos
+}  // namespace ash
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_PASSWORD_CHANGE_SUCCESS_NOTIFICATION_H_
diff --git a/chrome/browser/ash/login/saml/password_change_success_notification_unittest.cc b/chrome/browser/ash/login/saml/password_change_success_notification_unittest.cc
index d309664..4d373b8 100644
--- a/chrome/browser/ash/login/saml/password_change_success_notification_unittest.cc
+++ b/chrome/browser/ash/login/saml/password_change_success_notification_unittest.cc
@@ -14,12 +14,11 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-using message_center::Notification;
-
-namespace chromeos {
-
+namespace ash {
 namespace {
 
+using ::message_center::Notification;
+
 inline std::u16string utf16(const char* ascii) {
   return base::ASCIIToUTF16(ascii);
 }
@@ -48,4 +47,4 @@
             Notification()->message());
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_expiry_notification.cc b/chrome/browser/ash/login/saml/password_expiry_notification.cc
index 9e601b7..fb13723 100644
--- a/chrome/browser/ash/login/saml/password_expiry_notification.cc
+++ b/chrome/browser/ash/login/saml/password_expiry_notification.cc
@@ -36,22 +36,18 @@
 #include "ui/message_center/public/cpp/notification.h"
 #include "ui/message_center/public/cpp/notification_delegate.h"
 
-using message_center::ButtonInfo;
-using message_center::HandleNotificationClickDelegate;
-using message_center::Notification;
-using message_center::NotificationDelegate;
-using message_center::NotificationObserver;
-using message_center::NotificationType;
-using message_center::NotifierId;
-using message_center::NotifierType;
-using message_center::RichNotificationData;
-using message_center::SystemNotificationWarningLevel;
-using message_center::ThunkNotificationDelegate;
-
-namespace chromeos {
-
+namespace ash {
 namespace {
 
+using ::message_center::ButtonInfo;
+using ::message_center::Notification;
+using ::message_center::NotificationDelegate;
+using ::message_center::NotificationType;
+using ::message_center::NotifierId;
+using ::message_center::NotifierType;
+using ::message_center::RichNotificationData;
+using ::message_center::SystemNotificationWarningLevel;
+
 // Unique ID for this notification.
 const char kNotificationId[] = "saml.password-expiry-notification";
 
@@ -92,7 +88,7 @@
  protected:
   ~PasswordExpiryNotificationDelegate() override;
 
-  // message_center::NotificationDelegate:
+  // NotificationDelegate:
   void Close(bool by_user) override;
   void Click(const absl::optional<int>& button_index,
              const absl::optional<std::u16string>& reply) override;
@@ -128,7 +124,7 @@
 
   // NotifierId for histogram reporting.
   static const base::NoDestructor<NotifierId> kNotifierId(
-      message_center::NotifierType::SYSTEM_COMPONENT, kNotificationId);
+      NotifierType::SYSTEM_COMPONENT, kNotificationId);
 
   // Leaving this empty means the notification is attributed to the system -
   // ie "Chromium OS" or similar.
@@ -143,7 +139,7 @@
   const scoped_refptr<PasswordExpiryNotificationDelegate> delegate =
       base::MakeRefCounted<PasswordExpiryNotificationDelegate>();
 
-  std::unique_ptr<Notification> notification = ash::CreateSystemNotification(
+  std::unique_ptr<Notification> notification = CreateSystemNotification(
       kNotificationType, kNotificationId, title, body, *kEmptyDisplaySource,
       *kEmptyOriginUrl, *kNotifierId, rich_notification_data, delegate, kIcon,
       kWarningLevel);
@@ -176,4 +172,4 @@
       kNotificationHandlerType, kNotificationId);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_expiry_notification.h b/chrome/browser/ash/login/saml/password_expiry_notification.h
index eae791d..29e190e 100644
--- a/chrome/browser/ash/login/saml/password_expiry_notification.h
+++ b/chrome/browser/ash/login/saml/password_expiry_notification.h
@@ -11,7 +11,7 @@
 
 class Profile;
 
-namespace chromeos {
+namespace ash {
 
 // Utility functions to show or hide a password expiry notification.
 class PasswordExpiryNotification {
@@ -28,6 +28,12 @@
   static void Dismiss(Profile* profile);
 };
 
-}  // namespace chromeos
+}  // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+using ::ash::PasswordExpiryNotification;
+}
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_PASSWORD_EXPIRY_NOTIFICATION_H_
diff --git a/chrome/browser/ash/login/saml/password_expiry_notification_unittest.cc b/chrome/browser/ash/login/saml/password_expiry_notification_unittest.cc
index a5c39e3c..876259f5 100644
--- a/chrome/browser/ash/login/saml/password_expiry_notification_unittest.cc
+++ b/chrome/browser/ash/login/saml/password_expiry_notification_unittest.cc
@@ -24,12 +24,11 @@
 #include "testing/gmock/include/gmock/gmock.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-using message_center::Notification;
-
-namespace chromeos {
-
+namespace ash {
 namespace {
 
+using ::message_center::Notification;
+
 inline std::u16string utf16(const char* ascii) {
   return base::ASCIIToUTF16(ascii);
 }
@@ -99,4 +98,4 @@
   EXPECT_FALSE(Notification().has_value());
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_sync_token_checkers_collection.cc b/chrome/browser/ash/login/saml/password_sync_token_checkers_collection.cc
index f5634d75..a9699aee 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_checkers_collection.cc
+++ b/chrome/browser/ash/login/saml/password_sync_token_checkers_collection.cc
@@ -8,7 +8,7 @@
 #include "components/user_manager/known_user.h"
 #include "components/user_manager/user_manager.h"
 
-namespace chromeos {
+namespace ash {
 
 const net::BackoffEntry::Policy
     PasswordSyncTokenCheckersCollection::kFetchTokenRetryBackoffPolicy = {
@@ -61,4 +61,4 @@
     sync_token_checkers_.erase(sync_token);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_sync_token_checkers_collection.h b/chrome/browser/ash/login/saml/password_sync_token_checkers_collection.h
index 605ea40..f550033 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_checkers_collection.h
+++ b/chrome/browser/ash/login/saml/password_sync_token_checkers_collection.h
@@ -15,6 +15,10 @@
 #include "net/base/backoff_entry.h"
 
 namespace chromeos {
+class ExistingUserControllerForcedOnlineAuthTest;
+}
+
+namespace ash {
 
 // Helper class to handle PasswordSyncTokenLoginChecker objects for all users
 // on the login screen.
@@ -41,8 +45,8 @@
   void OnInvalidSyncToken(const AccountId& account_id) override;
 
  private:
+  friend class chromeos::ExistingUserControllerForcedOnlineAuthTest;
   friend class PasswordSyncTokenLoginCheckerTest;
-  friend class ExistingUserControllerForcedOnlineAuthTest;
 
   std::unordered_map<std::string,
                      std::unique_ptr<PasswordSyncTokenLoginChecker>>
@@ -50,12 +54,12 @@
   net::BackoffEntry sync_token_retry_backoff_;
 };
 
-}  // namespace chromeos
+}  // namespace ash
 
 // TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
 // source migration is finished.
-namespace ash {
-using ::chromeos::PasswordSyncTokenCheckersCollection;
+namespace chromeos {
+using ::ash::PasswordSyncTokenCheckersCollection;
 }
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_PASSWORD_SYNC_TOKEN_CHECKERS_COLLECTION_H_
diff --git a/chrome/browser/ash/login/saml/password_sync_token_fetcher.cc b/chrome/browser/ash/login/saml/password_sync_token_fetcher.cc
index a291553..daec739 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_fetcher.cc
+++ b/chrome/browser/ash/login/saml/password_sync_token_fetcher.cc
@@ -36,9 +36,9 @@
 #include "services/network/public/cpp/simple_url_loader.h"
 #include "services/network/public/mojom/url_response_head.mojom.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
+
 // These values should not be renumbered and numeric values should never
 // be reused. This must be kept in sync with SamlInSessionPasswordSyncEvent
 // in tools/metrics/histogram/enums.xml
@@ -386,4 +386,4 @@
   }
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_sync_token_fetcher.h b/chrome/browser/ash/login/saml/password_sync_token_fetcher.h
index a47079d..f3e74f2 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_fetcher.h
+++ b/chrome/browser/ash/login/saml/password_sync_token_fetcher.h
@@ -26,7 +26,7 @@
 class PrimaryAccountAccessTokenFetcher;
 }  // namespace signin
 
-namespace chromeos {
+namespace ash {
 
 // Records start of polling event in UMA histogram.
 void RecordStartOfSyncTokenPollingUMA(bool in_session);
@@ -99,6 +99,12 @@
   base::WeakPtrFactory<PasswordSyncTokenFetcher> weak_ptr_factory_{this};
 };
 
-}  // namespace chromeos
+}  // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+using ::ash::PasswordSyncTokenFetcher;
+}
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_PASSWORD_SYNC_TOKEN_FETCHER_H_
diff --git a/chrome/browser/ash/login/saml/password_sync_token_login_checker.cc b/chrome/browser/ash/login/saml/password_sync_token_login_checker.cc
index 8988a67..66d129c 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_login_checker.cc
+++ b/chrome/browser/ash/login/saml/password_sync_token_login_checker.cc
@@ -12,10 +12,11 @@
 #include "components/user_manager/user_manager.h"
 #include "content/public/browser/storage_partition.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
+
 const base::TimeDelta kPollingInterval = base::TimeDelta::FromMinutes(5);
+
 }
 
 PasswordSyncTokenLoginChecker::PasswordSyncTokenLoginChecker(
@@ -117,4 +118,4 @@
   }
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_sync_token_login_checker.h b/chrome/browser/ash/login/saml/password_sync_token_login_checker.h
index 8eed68f..342fd4b 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_login_checker.h
+++ b/chrome/browser/ash/login/saml/password_sync_token_login_checker.h
@@ -16,7 +16,7 @@
 #include "components/account_id/account_id.h"
 #include "net/base/backoff_entry.h"
 
-namespace chromeos {
+namespace ash {
 
 // Verifies local copy of the password sync token by executing API call. If
 // token is invalid calls InSessionPasswordSyncManager to request online re-auth
@@ -78,12 +78,12 @@
   base::WeakPtrFactory<PasswordSyncTokenLoginChecker> weak_ptr_factory_{this};
 };
 
-}  // namespace chromeos
+}  // namespace ash
 
 // TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
 // source migration is finished.
-namespace ash {
-using ::chromeos::PasswordSyncTokenLoginChecker;
+namespace chromeos {
+using ::ash::PasswordSyncTokenLoginChecker;
 }
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_PASSWORD_SYNC_TOKEN_LOGIN_CHECKER_H_
diff --git a/chrome/browser/ash/login/saml/password_sync_token_login_checker_unittest.cc b/chrome/browser/ash/login/saml/password_sync_token_login_checker_unittest.cc
index 532639da..8064fa58 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_login_checker_unittest.cc
+++ b/chrome/browser/ash/login/saml/password_sync_token_login_checker_unittest.cc
@@ -14,8 +14,7 @@
 #include "content/public/test/browser_task_environment.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
 
 const char kSAMLUserId[] = "12345";
@@ -120,4 +119,4 @@
       "ChromeOS.SAML.InSessionPasswordSyncEvent", 1, 1);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_sync_token_verifier.cc b/chrome/browser/ash/login/saml/password_sync_token_verifier.cc
index f6ad824..92ab4e03 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_verifier.cc
+++ b/chrome/browser/ash/login/saml/password_sync_token_verifier.cc
@@ -13,10 +13,11 @@
 #include "components/user_manager/known_user.h"
 #include "content/public/browser/storage_partition.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
+
 const char dummy_token[] = "dummy-token";
+
 }
 
 const net::BackoffEntry::Policy
@@ -183,4 +184,4 @@
   }
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_sync_token_verifier.h b/chrome/browser/ash/login/saml/password_sync_token_verifier.h
index f08b733..1ea2ea5a 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_verifier.h
+++ b/chrome/browser/ash/login/saml/password_sync_token_verifier.h
@@ -22,7 +22,7 @@
 class User;
 }
 
-namespace chromeos {
+namespace ash {
 
 // Verifies local copy of the password sync token by executing API call. If
 // token is invalid calls InSessionPasswordSyncManager to request online re-auth
@@ -75,12 +75,6 @@
   friend class PasswordSyncTokenVerifierTest;
 };
 
-}  // namespace chromeos
-
-// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
-// source migration is finished.
-namespace ash {
-using ::chromeos::PasswordSyncTokenVerifier;
-}
+}  // namespace ash
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_PASSWORD_SYNC_TOKEN_VERIFIER_H_
diff --git a/chrome/browser/ash/login/saml/password_sync_token_verifier_factory.cc b/chrome/browser/ash/login/saml/password_sync_token_verifier_factory.cc
index dc1c7d5..8fae953 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_verifier_factory.cc
+++ b/chrome/browser/ash/login/saml/password_sync_token_verifier_factory.cc
@@ -14,7 +14,7 @@
 #include "components/user_manager/user_manager.h"
 #include "content/public/browser/browser_context.h"
 
-namespace chromeos {
+namespace ash {
 
 // static
 PasswordSyncTokenVerifierFactory*
@@ -51,4 +51,4 @@
   return new PasswordSyncTokenVerifier(profile);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/password_sync_token_verifier_factory.h b/chrome/browser/ash/login/saml/password_sync_token_verifier_factory.h
index d550c8a..2ef228e 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_verifier_factory.h
+++ b/chrome/browser/ash/login/saml/password_sync_token_verifier_factory.h
@@ -10,8 +10,7 @@
 
 class Profile;
 
-namespace chromeos {
-
+namespace ash {
 class PasswordSyncTokenVerifier;
 
 // Singleton that owns all PasswordSyncTokenVerifiers and associates them
@@ -34,12 +33,6 @@
       content::BrowserContext* context) const override;
 };
 
-}  // namespace chromeos
-
-// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
-// source migration is finished.
-namespace ash {
-using ::chromeos::PasswordSyncTokenVerifierFactory;
-}
+}  // namespace ash
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_PASSWORD_SYNC_TOKEN_VERIFIER_FACTORY_H_
diff --git a/chrome/browser/ash/login/saml/password_sync_token_verifier_unittest.cc b/chrome/browser/ash/login/saml/password_sync_token_verifier_unittest.cc
index 4874cc4..fa34ea8 100644
--- a/chrome/browser/ash/login/saml/password_sync_token_verifier_unittest.cc
+++ b/chrome/browser/ash/login/saml/password_sync_token_verifier_unittest.cc
@@ -19,8 +19,7 @@
 #include "components/user_manager/user_names.h"
 #include "content/public/test/browser_task_environment.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
 
 const char kSAMLUserId1[] = "12345";
@@ -244,4 +243,4 @@
       "ChromeOS.SAML.InSessionPasswordSyncEvent", 0, 1);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/public_saml_url_fetcher.cc b/chrome/browser/ash/login/saml/public_saml_url_fetcher.cc
index 1a92b78..976a15c 100644
--- a/chrome/browser/ash/login/saml/public_saml_url_fetcher.cc
+++ b/chrome/browser/ash/login/saml/public_saml_url_fetcher.cc
@@ -25,8 +25,11 @@
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "url/gurl.h"
 
-namespace em = enterprise_management;
+namespace ash {
 namespace {
+
+namespace em = ::enterprise_management;
+
 std::string GetDeviceId() {
   policy::BrowserPolicyConnectorChromeOS* connector =
       g_browser_process->platform_part()->browser_policy_connector_chromeos();
@@ -35,7 +38,7 @@
 
 std::string GetAccountId(std::string user_id) {
   std::vector<policy::DeviceLocalAccount> device_local_accounts =
-      policy::GetDeviceLocalAccounts(chromeos::CrosSettings::Get());
+      policy::GetDeviceLocalAccounts(CrosSettings::Get());
   for (auto account : device_local_accounts) {
     if (account.user_id == user_id) {
       return account.account_id;
@@ -43,9 +46,9 @@
   }
   return std::string();
 }
+
 }  // namespace
 
-namespace chromeos {
 PublicSamlUrlFetcher::PublicSamlUrlFetcher(AccountId account_id)
     : account_id_(GetAccountId(account_id.GetUserEmail())) {}
 
@@ -71,9 +74,8 @@
       service,
       policy::DeviceManagementService::JobConfiguration::TYPE_REQUEST_SAML_URL,
       GetDeviceId(), /*critical=*/false,
-      policy::DMAuth::FromDMToken(chromeos::DeviceSettingsService::Get()
-                                      ->policy_data()
-                                      ->request_token()),
+      policy::DMAuth::FromDMToken(
+          DeviceSettingsService::Get()->policy_data()->request_token()),
       /*oauth_token=*/absl::nullopt,
       g_browser_process->system_network_context_manager()
           ->GetSharedURLLoaderFactory(),
@@ -123,4 +125,4 @@
   std::move(callback_).Run();
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/public_saml_url_fetcher.h b/chrome/browser/ash/login/saml/public_saml_url_fetcher.h
index 385cbe7..d838bbae67 100644
--- a/chrome/browser/ash/login/saml/public_saml_url_fetcher.h
+++ b/chrome/browser/ash/login/saml/public_saml_url_fetcher.h
@@ -19,7 +19,7 @@
 class DeviceManagementResponse;
 }  // namespace enterprise_management
 
-namespace chromeos {
+namespace ash {
 
 // This class handles sending request for public SAML session URL to DM
 // server, waits for the response and retrieves the redirect URL from it.
@@ -62,6 +62,12 @@
   DISALLOW_COPY_AND_ASSIGN(PublicSamlUrlFetcher);
 };
 
-}  // namespace chromeos
+}  // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+using ::ash::PublicSamlUrlFetcher;
+}
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_PUBLIC_SAML_URL_FETCHER_H_
diff --git a/chrome/browser/ash/login/saml/saml_browsertest.cc b/chrome/browser/ash/login/saml/saml_browsertest.cc
index efca85b..8d115e9 100644
--- a/chrome/browser/ash/login/saml/saml_browsertest.cc
+++ b/chrome/browser/ash/login/saml/saml_browsertest.cc
@@ -10,7 +10,6 @@
 #include "ash/constants/ash_features.h"
 #include "ash/constants/ash_switches.h"
 #include "ash/public/cpp/login_screen_test_api.h"
-
 #include "base/bind.h"
 #include "base/callback.h"
 #include "base/callback_helpers.h"
@@ -118,20 +117,18 @@
 #include "ui/base/l10n/l10n_util.h"
 #include "url/gurl.h"
 
-namespace em = enterprise_management;
-
-using base::test::RunOnceCallback;
-
-using testing::_;
-using testing::Invoke;
-using testing::NiceMock;
-using testing::Return;
-using testing::WithArgs;
-
-namespace chromeos {
-
+namespace ash {
 namespace {
 
+namespace em = ::enterprise_management;
+
+using ::base::test::RunOnceCallback;
+using ::testing::_;
+using ::testing::Invoke;
+using ::testing::NiceMock;
+using ::testing::Return;
+using ::testing::WithArgs;
+
 const test::UIPath kPasswordInput = {"saml-confirm-password", "passwordInput"};
 const test::UIPath kPasswordConfirmInput = {"saml-confirm-password",
                                             "confirmPasswordInput"};
@@ -214,8 +211,7 @@
     OobeBaseTest::SetUpCommandLine(command_line);
 
     command_line->AppendSwitch(switches::kOobeSkipPostLogin);
-    command_line->AppendSwitch(
-        chromeos::switches::kAllowFailedPolicyFetchForTest);
+    command_line->AppendSwitch(switches::kAllowFailedPolicyFetchForTest);
 
     // TODO(crbug.com/1177416) - Fix this with a proper SSL solution.
     command_line->AppendSwitch(::switches::kIgnoreCertificateErrors);
@@ -312,9 +308,9 @@
   void ExpectFatalErrorMessage(const std::string& error_message) {
     OobeScreenWaiter(SignInFatalErrorView::kScreenId).Wait();
 
-    EXPECT_TRUE(ash::LoginScreenTestApi::IsShutdownButtonShown());
-    EXPECT_FALSE(ash::LoginScreenTestApi::IsGuestButtonShown());
-    EXPECT_FALSE(ash::LoginScreenTestApi::IsAddUserButtonShown());
+    EXPECT_TRUE(LoginScreenTestApi::IsShutdownButtonShown());
+    EXPECT_FALSE(LoginScreenTestApi::IsGuestButtonShown());
+    EXPECT_FALSE(LoginScreenTestApi::IsAddUserButtonShown());
 
     test::OobeJS().ExpectElementText(error_message,
                                      {"signin-fatal-error", "subtitle"});
@@ -1068,7 +1064,7 @@
       "$('gaia-signin').authenticator_.addEventListener('ready', function() {"
       "  window.domAutomationController.send('ready');"
       "});"));
-  ASSERT_TRUE(ash::LoginScreenTestApi::ClickAddUserButton());
+  ASSERT_TRUE(LoginScreenTestApi::ClickAddUserButton());
   std::string message;
   do {
     ASSERT_TRUE(message_queue.WaitForMessage(&message));
@@ -1077,7 +1073,7 @@
 
 void SAMLPolicyTest::ShowSAMLInterstitial() {
   WaitForOobeUI();
-  ASSERT_TRUE(ash::LoginScreenTestApi::ClickAddUserButton());
+  ASSERT_TRUE(LoginScreenTestApi::ClickAddUserButton());
   test::OobeJS()
       .CreateVisibilityWaiter(true, {"gaia-signin", "saml-interstitial"})
       ->Wait();
@@ -1127,7 +1123,7 @@
 }
 
 void SAMLPolicyTest::GetCookies() {
-  Profile* profile = chromeos::ProfileHelper::Get()->GetProfileByUserUnsafe(
+  Profile* profile = ProfileHelper::Get()->GetProfileByUserUnsafe(
       user_manager::UserManager::Get()->GetActiveUser());
   ASSERT_TRUE(profile);
   base::RunLoop run_loop;
@@ -1165,7 +1161,7 @@
 // authenticated without SAML.
 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, NoSAML) {
   // Verify that offline login is allowed.
-  ash::LoginScreenTestApi::SubmitPassword(
+  LoginScreenTestApi::SubmitPassword(
       AccountId::FromUserEmail(kNonSAMLUserEmail), "password",
       true /* check_if_submittable */);
   test::WaitForPrimaryUserSessionStart();
@@ -1184,7 +1180,7 @@
 // authenticated with SAML is allowed to log in offline.
 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLNoLimit) {
   // Verify that offline login is allowed.
-  ash::LoginScreenTestApi::SubmitPassword(
+  LoginScreenTestApi::SubmitPassword(
       AccountId::FromUserEmail(saml_test_users::kFirstUserCorpExampleComEmail),
       "password", true /* check_if_submittable */);
   test::WaitForPrimaryUserSessionStart();
@@ -1203,9 +1199,8 @@
 // authenticated via SAML, that user is forced to log in online the next time.
 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, SAMLZeroLimit) {
   // Verify that offline login is not allowed.
-  ASSERT_TRUE(
-      ash::LoginScreenTestApi::IsForcedOnlineSignin(AccountId::FromUserEmail(
-          saml_test_users::kFirstUserCorpExampleComEmail)));
+  ASSERT_TRUE(LoginScreenTestApi::IsForcedOnlineSignin(AccountId::FromUserEmail(
+      saml_test_users::kFirstUserCorpExampleComEmail)));
 }
 
 IN_PROC_BROWSER_TEST_F(SAMLPolicyTest, PRE_PRE_TransferCookiesAffiliated) {
@@ -1329,8 +1324,8 @@
   ShowSAMLInterstitial();
   ClickBackOnSAMLInterstitialPage();
   // Back button should hide OOBE dialog.
-  EXPECT_FALSE(ash::LoginScreenTestApi::IsOobeDialogVisible());
-  EXPECT_TRUE(ash::LoginScreenTestApi::IsAddUserButtonShown());
+  EXPECT_FALSE(LoginScreenTestApi::IsOobeDialogVisible());
+  EXPECT_TRUE(LoginScreenTestApi::IsAddUserButtonShown());
 
   ShowSAMLInterstitial();
   ClickNextOnSAMLInterstitialPage();
@@ -1520,7 +1515,7 @@
  protected:
   void SetAllowedUrlsPolicy(const std::vector<std::string>& allowed_urls);
 
-  chromeos::ScopedTestingCrosSettings settings_helper_;
+  ScopedTestingCrosSettings settings_helper_;
   StubCrosSettingsProvider* settings_provider_ = nullptr;
 
   attestation::MockMachineCertificateUploader mock_cert_uploader_;
@@ -1760,4 +1755,4 @@
       attestation::TpmChallengeKeyResultCode::kTimeoutError, 1);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/saml_lockscreen_browsertest.cc b/chrome/browser/ash/login/saml/saml_lockscreen_browsertest.cc
index 7419749e..7a04bb2 100644
--- a/chrome/browser/ash/login/saml/saml_lockscreen_browsertest.cc
+++ b/chrome/browser/ash/login/saml/saml_lockscreen_browsertest.cc
@@ -31,9 +31,9 @@
 #include "net/dns/mock_host_resolver.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
+
 const test::UIPath kSamlContainer = {"main-element", "body"};
 const test::UIPath kMainVerifyButton = {"main-element",
                                         "nextButtonVerifyScreen"};
@@ -43,6 +43,7 @@
 constexpr char kTestAuthSIDCookie1[] = "fake-auth-SID-cookie-1";
 constexpr char kTestAuthLSIDCookie1[] = "fake-auth-LSID-cookie-1";
 constexpr char kTestRefreshToken[] = "fake-refresh-token";
+
 }  // namespace
 
 class LockscreenWebUiTest : public MixinBasedInProcessBrowserTest {
@@ -58,8 +59,7 @@
   ~LockscreenWebUiTest() override = default;
 
   void SetUpCommandLine(base::CommandLine* command_line) override {
-    command_line->AppendSwitch(
-        chromeos::switches::kAllowFailedPolicyFetchForTest);
+    command_line->AppendSwitch(switches::kAllowFailedPolicyFetchForTest);
     // TODO(crbug.com/1177416) - Fix this with a proper SSL solution.
     command_line->AppendSwitch(::switches::kIgnoreCertificateErrors);
 
@@ -173,7 +173,7 @@
   base::test::ScopedFeatureList feature_list_;
 
  private:
-  chromeos::InSessionPasswordSyncManager* password_sync_manager_ = nullptr;
+  InSessionPasswordSyncManager* password_sync_manager_ = nullptr;
   chromeos::LockScreenStartReauthDialog* reauth_dialog_ = nullptr;
   LockScreenStartReauthUI* reauth_webui_controller_ = nullptr;
   LockScreenReauthHandler* main_handler_ = nullptr;
@@ -218,4 +218,4 @@
   ScreenLockerTester().WaitForUnlock();
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/saml_metric_utils.cc b/chrome/browser/ash/login/saml/saml_metric_utils.cc
index a53cedf..7437a744 100644
--- a/chrome/browser/ash/login/saml/saml_metric_utils.cc
+++ b/chrome/browser/ash/login/saml/saml_metric_utils.cc
@@ -9,7 +9,7 @@
 #include "base/strings/string_util.h"
 #include "net/cert/x509_certificate.h"
 
-namespace chromeos {
+namespace ash {
 namespace metrics {
 namespace {
 
@@ -86,4 +86,4 @@
 }
 
 }  // namespace metrics
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/saml_metric_utils.h b/chrome/browser/ash/login/saml/saml_metric_utils.h
index ca9a8c1..eed621d 100644
--- a/chrome/browser/ash/login/saml/saml_metric_utils.h
+++ b/chrome/browser/ash/login/saml/saml_metric_utils.h
@@ -7,12 +7,20 @@
 
 #include <string>
 
-namespace chromeos {
+namespace ash {
 namespace metrics {
 
 void RecordSAMLProvider(const std::string& provider);
 
 }  // namespace metrics
+}  // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+namespace metrics {
+using ::ash::metrics::RecordSAMLProvider;
+}
 }  // namespace chromeos
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_SAML_METRIC_UTILS_H_
diff --git a/chrome/browser/ash/login/saml/saml_profile_prefs.cc b/chrome/browser/ash/login/saml/saml_profile_prefs.cc
index 774506b..51d887b 100644
--- a/chrome/browser/ash/login/saml/saml_profile_prefs.cc
+++ b/chrome/browser/ash/login/saml/saml_profile_prefs.cc
@@ -9,7 +9,7 @@
 #include "chromeos/login/auth/saml_password_attributes.h"
 #include "components/prefs/pref_registry_simple.h"
 
-namespace chromeos {
+namespace ash {
 
 void RegisterSamlProfilePrefs(PrefRegistrySimple* registry) {
   // All SAML prefs are not syncable by default. In order to make a new pref
@@ -47,4 +47,4 @@
   SamlPasswordAttributes::RegisterProfilePrefs(registry);
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/saml_profile_prefs.h b/chrome/browser/ash/login/saml/saml_profile_prefs.h
index 0c63210..8657616a 100644
--- a/chrome/browser/ash/login/saml/saml_profile_prefs.h
+++ b/chrome/browser/ash/login/saml/saml_profile_prefs.h
@@ -7,11 +7,17 @@
 
 class PrefRegistrySimple;
 
-namespace chromeos {
+namespace ash {
 
 // Registers all Saml-related profile prefs.
 void RegisterSamlProfilePrefs(PrefRegistrySimple* registry);
 
-}  // namespace chromeos
+}  // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+using ::ash::RegisterSamlProfilePrefs;
+}
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_SAML_PROFILE_PREFS_H_
diff --git a/chrome/browser/ash/login/saml/security_token_saml_browsertest.cc b/chrome/browser/ash/login/saml/security_token_saml_browsertest.cc
index a141c8f..398855c 100644
--- a/chrome/browser/ash/login/saml/security_token_saml_browsertest.cc
+++ b/chrome/browser/ash/login/saml/security_token_saml_browsertest.cc
@@ -42,8 +42,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
 
 // Pattern for the DeviceLoginScreenAutoSelectCertificateForUrls admin policy
@@ -76,7 +75,7 @@
 
 // Returns the profile into which login-screen extensions are force-installed.
 Profile* GetOriginalSigninProfile() {
-  return chromeos::ProfileHelper::GetSigninProfile()->GetOriginalProfile();
+  return ProfileHelper::GetSigninProfile()->GetOriginalProfile();
 }
 
 }  // namespace
@@ -122,8 +121,7 @@
     command_line->AppendSwitch(switches::kOobeSkipPostLogin);
     // Avoid aborting the user sign-in due to the user policy requests not being
     // faked in the test.
-    command_line->AppendSwitch(
-        chromeos::switches::kAllowFailedPolicyFetchForTest);
+    command_line->AppendSwitch(switches::kAllowFailedPolicyFetchForTest);
   }
 
   void SetUpOnMainThread() override {
@@ -266,4 +264,4 @@
   EXPECT_EQ(1, pin_dialog_shown_count());
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/test_client_cert_saml_idp_mixin.cc b/chrome/browser/ash/login/saml/test_client_cert_saml_idp_mixin.cc
index 42f57830..307788ad 100644
--- a/chrome/browser/ash/login/saml/test_client_cert_saml_idp_mixin.cc
+++ b/chrome/browser/ash/login/saml/test_client_cert_saml_idp_mixin.cc
@@ -17,8 +17,7 @@
 #include "testing/gtest/include/gtest/gtest.h"
 #include "url/gurl.h"
 
-namespace chromeos {
-
+namespace ash {
 namespace {
 
 // Name of the "RelayState" URL parameter from the SAML specification.
@@ -132,4 +131,4 @@
   return assertion_url;
 }
 
-}  // namespace chromeos
+}  // namespace ash
diff --git a/chrome/browser/ash/login/saml/test_client_cert_saml_idp_mixin.h b/chrome/browser/ash/login/saml/test_client_cert_saml_idp_mixin.h
index c7f313a..48803a80 100644
--- a/chrome/browser/ash/login/saml/test_client_cert_saml_idp_mixin.h
+++ b/chrome/browser/ash/login/saml/test_client_cert_saml_idp_mixin.h
@@ -9,6 +9,8 @@
 #include <string>
 #include <vector>
 
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chrome/browser/ash/login/test/fake_gaia_mixin.h"
 #include "chrome/test/base/mixin_based_in_process_browser_test.h"
 #include "net/test/embedded_test_server/embedded_test_server.h"
 
@@ -21,9 +23,7 @@
 }  // namespace test_server
 }  // namespace net
 
-namespace chromeos {
-
-class FakeGaiaMixin;
+namespace ash {
 
 class TestClientCertSamlIdpMixin final : public InProcessBrowserTestMixin {
  public:
@@ -65,6 +65,6 @@
       net::EmbeddedTestServer::TYPE_HTTPS};
 };
 
-}  // namespace chromeos
+}  // namespace ash
 
 #endif  // CHROME_BROWSER_ASH_LOGIN_SAML_TEST_CLIENT_CERT_SAML_IDP_MIXIN_H_
diff --git a/chrome/browser/ash/login/test/https_forwarder.h b/chrome/browser/ash/login/test/https_forwarder.h
index c26b98d1..f7558e24c 100644
--- a/chrome/browser/ash/login/test/https_forwarder.h
+++ b/chrome/browser/ash/login/test/https_forwarder.h
@@ -49,4 +49,10 @@
 
 }  // namespace chromeos
 
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::HTTPSForwarder;
+}
+
 #endif  // CHROME_BROWSER_ASH_LOGIN_TEST_HTTPS_FORWARDER_H_
diff --git a/chrome/browser/browser_process_platform_part_chromeos.cc b/chrome/browser/browser_process_platform_part_chromeos.cc
index f0b3a84..e2ee3691 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.cc
+++ b/chrome/browser/browser_process_platform_part_chromeos.cc
@@ -286,8 +286,7 @@
 
   DCHECK(!in_session_password_change_manager_);
   in_session_password_change_manager_ =
-      chromeos::InSessionPasswordChangeManager::CreateIfEnabled(
-          primary_profile);
+      ash::InSessionPasswordChangeManager::CreateIfEnabled(primary_profile);
 
   primary_profile_shutdown_subscription_ =
       PrimaryProfileServicesShutdownNotifierFactory::GetInstance()
diff --git a/chrome/browser/browser_process_platform_part_chromeos.h b/chrome/browser/browser_process_platform_part_chromeos.h
index bf80694..52d95c18 100644
--- a/chrome/browser/browser_process_platform_part_chromeos.h
+++ b/chrome/browser/browser_process_platform_part_chromeos.h
@@ -23,6 +23,7 @@
 class AccountManagerFactory;
 class ChromeSessionManager;
 class ChromeUserManager;
+class InSessionPasswordChangeManager;
 class ProfileHelper;
 
 namespace system {
@@ -35,7 +36,6 @@
 }  // namespace ash
 
 namespace chromeos {
-class InSessionPasswordChangeManager;
 class KernelFeatureManager;
 class SchedulerConfigurationManager;
 class TimeZoneResolver;
@@ -133,8 +133,7 @@
 
   ash::AccountManagerFactory* GetAccountManagerFactory();
 
-  chromeos::InSessionPasswordChangeManager*
-  in_session_password_change_manager() {
+  ash::InSessionPasswordChangeManager* in_session_password_change_manager() {
     return in_session_password_change_manager_.get();
   }
 
@@ -197,7 +196,7 @@
 
   std::unique_ptr<ash::AccountManagerFactory> account_manager_factory_;
 
-  std::unique_ptr<chromeos::InSessionPasswordChangeManager>
+  std::unique_ptr<ash::InSessionPasswordChangeManager>
       in_session_password_change_manager_;
 
   base::CallbackListSubscription primary_profile_shutdown_subscription_;
diff --git a/chrome/browser/chromeos/scoped_test_system_nss_key_slot_mixin.h b/chrome/browser/chromeos/scoped_test_system_nss_key_slot_mixin.h
index e5af37a..1399198 100644
--- a/chrome/browser/chromeos/scoped_test_system_nss_key_slot_mixin.h
+++ b/chrome/browser/chromeos/scoped_test_system_nss_key_slot_mixin.h
@@ -44,4 +44,10 @@
 
 }  // namespace chromeos
 
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::ScopedTestSystemNSSKeySlotMixin;
+}
+
 #endif  // CHROME_BROWSER_CHROMEOS_SCOPED_TEST_SYSTEM_NSS_KEY_SLOT_MIXIN_H_
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index cbc6965b..93b3d96 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1276,7 +1276,7 @@
   ash::parent_access::ParentAccessService::RegisterProfilePrefs(registry);
   chromeos::quick_answers::prefs::RegisterProfilePrefs(registry);
   ash::quick_unlock::RegisterProfilePrefs(registry);
-  chromeos::RegisterSamlProfilePrefs(registry);
+  ash::RegisterSamlProfilePrefs(registry);
   ash::ScreenTimeController::RegisterProfilePrefs(registry);
   SecondaryAccountConsentLogger::RegisterPrefs(registry);
   ash::EduCoexistenceConsentInvalidationController::RegisterProfilePrefs(
diff --git a/chrome/browser/ui/ash/login_screen_client_impl.cc b/chrome/browser/ui/ash/login_screen_client_impl.cc
index 92cef5f..bdb476b 100644
--- a/chrome/browser/ui/ash/login_screen_client_impl.cc
+++ b/chrome/browser/ui/ash/login_screen_client_impl.cc
@@ -356,8 +356,8 @@
         user_manager::UserManager::Get()->FindUser(prefilled_account);
     Profile* profile = chromeos::ProfileHelper::Get()->GetProfileByUser(user);
     DCHECK(session_manager::SessionManager::Get()->IsScreenLocked());
-    chromeos::InSessionPasswordSyncManager* password_sync_manager =
-        chromeos::InSessionPasswordSyncManagerFactory::GetForProfile(profile);
+    auto* password_sync_manager =
+        ash::InSessionPasswordSyncManagerFactory::GetForProfile(profile);
     if (password_sync_manager) {
       password_sync_manager->CreateAndShowDialog();
     }
diff --git a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.cc b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.cc
index 941311b..06c3be88 100644
--- a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.cc
+++ b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.cc
@@ -108,8 +108,8 @@
   const user_manager::User* user =
       user_manager::UserManager::Get()->GetActiveUser();
   Profile* profile = ProfileHelper::Get()->GetProfileByUser(user);
-  InSessionPasswordSyncManager* password_sync_manager =
-      chromeos::InSessionPasswordSyncManagerFactory::GetForProfile(profile);
+  auto* password_sync_manager =
+      InSessionPasswordSyncManagerFactory::GetForProfile(profile);
   password_sync_manager->ResetDialog();
 }
 
diff --git a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.h b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.h
index d42a16f..ea866c45 100644
--- a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.h
+++ b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_dialogs.h
@@ -54,4 +54,10 @@
 
 }  // namespace chromeos
 
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::LockScreenStartReauthDialog;
+}
+
 #endif  // CHROME_BROWSER_UI_WEBUI_CHROMEOS_IN_SESSION_PASSWORD_CHANGE_LOCK_SCREEN_REAUTH_DIALOGS_H_
diff --git a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_handler.cc b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_handler.cc
index e2d91cf..87f6797 100644
--- a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_handler.cc
@@ -62,12 +62,12 @@
   return user && user->using_saml();
 }
 
-chromeos::InSessionPasswordSyncManager* GetInSessionPasswordSyncManager() {
+InSessionPasswordSyncManager* GetInSessionPasswordSyncManager() {
   const user_manager::User* user =
       user_manager::UserManager::Get()->GetActiveUser();
   Profile* profile = chromeos::ProfileHelper::Get()->GetProfileByUser(user);
 
-  return chromeos::InSessionPasswordSyncManagerFactory::GetForProfile(profile);
+  return InSessionPasswordSyncManagerFactory::GetForProfile(profile);
 }
 
 const char kMainElement[] = "$(\'main-element\').";
@@ -210,8 +210,7 @@
   bool is_horizontal = display.width() >= display.height();
   CallJavascript("setOrientation", base::Value(is_horizontal));
 
-  chromeos::InSessionPasswordSyncManager* password_sync_manager =
-      GetInSessionPasswordSyncManager();
+  auto* password_sync_manager = GetInSessionPasswordSyncManager();
   int width = password_sync_manager->GetDialogWidth();
   CallJavascript("setWidth", base::Value(width));
 }
@@ -277,8 +276,7 @@
 
 void LockScreenReauthHandler::OnCookieWaitTimeout() {
   NOTREACHED() << "Cookie has timed out while attempting to login in.";
-  chromeos::InSessionPasswordSyncManager* password_sync_manager =
-      GetInSessionPasswordSyncManager();
+  auto* password_sync_manager = GetInSessionPasswordSyncManager();
   password_sync_manager->DismissDialog();
 }
 
@@ -300,7 +298,7 @@
       base::BindRepeating(&LockScreenReauthHandler::ShowPasswordChangedScreen,
                           weak_factory_.GetWeakPtr());
   password_sync_manager_ =
-      chromeos::InSessionPasswordSyncManagerFactory::GetForProfile(profile);
+      InSessionPasswordSyncManagerFactory::GetForProfile(profile);
   password_sync_manager_->CheckCredentials(user_context,
                                            password_changed_callback);
 }
diff --git a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_handler.h b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_handler.h
index ec62fb2..f944f3c 100644
--- a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_handler.h
+++ b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_reauth_handler.h
@@ -7,12 +7,13 @@
 
 #include "base/memory/weak_ptr.h"
 #include "base/values.h"
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chrome/browser/ash/login/saml/in_session_password_sync_manager.h"
 #include "chrome/browser/ui/webui/chromeos/login/online_login_helper.h"
 #include "content/public/browser/web_ui_message_handler.h"
 #include "net/cookies/cookie_access_result.h"
 
 namespace chromeos {
-class InSessionPasswordSyncManager;
 
 class LockScreenReauthHandler : public content::WebUIMessageHandler {
  public:
@@ -99,4 +100,10 @@
 
 }  // namespace chromeos
 
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::LockScreenReauthHandler;
+}
+
 #endif  // CHROME_BROWSER_UI_WEBUI_CHROMEOS_IN_SESSION_PASSWORD_CHANGE_LOCK_SCREEN_REAUTH_HANDLER_H_
diff --git a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_start_reauth_ui.h b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_start_reauth_ui.h
index 2e0049ab..e69dcf79 100644
--- a/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_start_reauth_ui.h
+++ b/chrome/browser/ui/webui/chromeos/in_session_password_change/lock_screen_start_reauth_ui.h
@@ -28,4 +28,10 @@
 
 }  // namespace chromeos
 
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::LockScreenStartReauthUI;
+}
+
 #endif  // CHROME_BROWSER_UI_WEBUI_CHROMEOS_IN_SESSION_PASSWORD_CHANGE_LOCK_SCREEN_START_REAUTH_UI_H_
diff --git a/chrome/browser/ui/webui/chromeos/in_session_password_change/password_change_dialogs.h b/chrome/browser/ui/webui/chromeos/in_session_password_change/password_change_dialogs.h
index 7ff46174..f6f32a2 100644
--- a/chrome/browser/ui/webui/chromeos/in_session_password_change/password_change_dialogs.h
+++ b/chrome/browser/ui/webui/chromeos/in_session_password_change/password_change_dialogs.h
@@ -90,4 +90,12 @@
 
 }  // namespace chromeos
 
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::ConfirmPasswordChangeDialog;
+using ::chromeos::PasswordChangeDialog;
+using ::chromeos::UrgentPasswordExpiryNotificationDialog;
+}  // namespace ash
+
 #endif  // CHROME_BROWSER_UI_WEBUI_CHROMEOS_IN_SESSION_PASSWORD_CHANGE_PASSWORD_CHANGE_DIALOGS_H_
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
index 18e6dcea..bcfd1c4 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.cc
@@ -349,7 +349,7 @@
     if (user && user->using_saml() &&
         user->GetType() == user_manager::USER_TYPE_PUBLIC_ACCOUNT) {
       public_saml_url_fetcher_ =
-          std::make_unique<chromeos::PublicSamlUrlFetcher>(account_id);
+          std::make_unique<PublicSamlUrlFetcher>(account_id);
       public_saml_url_fetcher_->Fetch(std::move(partition_call));
       return;
     }
diff --git a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h
index e662faa..4b2d5f7 100644
--- a/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h
@@ -13,6 +13,8 @@
 #include "base/memory/ref_counted.h"
 #include "chrome/browser/ash/certificate_provider/security_token_pin_dialog_host.h"
 #include "chrome/browser/ash/login/login_client_cert_usage_observer.h"
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chrome/browser/ash/login/saml/public_saml_url_fetcher.h"
 #include "chrome/browser/ui/webui/chromeos/login/base_screen_handler.h"
 #include "chrome/browser/ui/webui/chromeos/login/core_oobe_handler.h"
 #include "chrome/browser/ui/webui/chromeos/login/network_state_informer.h"
@@ -40,9 +42,7 @@
 }
 
 namespace chromeos {
-
 class SigninScreenHandler;
-class PublicSamlUrlFetcher;
 
 class GaiaView {
  public:
@@ -391,7 +391,7 @@
   std::unique_ptr<LoginClientCertUsageObserver>
       extension_provided_client_cert_usage_observer_;
 
-  std::unique_ptr<chromeos::PublicSamlUrlFetcher> public_saml_url_fetcher_;
+  std::unique_ptr<PublicSamlUrlFetcher> public_saml_url_fetcher_;
 
   // State of the security token PIN dialogs:
 
diff --git a/chrome/browser/ui/webui/chromeos/login/saml_challenge_key_handler.h b/chrome/browser/ui/webui/chromeos/login/saml_challenge_key_handler.h
index f424bd3..cfcb7c3e 100644
--- a/chrome/browser/ui/webui/chromeos/login/saml_challenge_key_handler.h
+++ b/chrome/browser/ui/webui/chromeos/login/saml_challenge_key_handler.h
@@ -69,4 +69,11 @@
 
 }  // namespace chromeos
 
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace ash {
+using ::chromeos::kSamlChallengeKeyHandlerResultMetric;
+using ::chromeos::SamlChallengeKeyHandler;
+}  // namespace ash
+
 #endif  // CHROME_BROWSER_UI_WEBUI_CHROMEOS_LOGIN_SAML_CHALLENGE_KEY_HANDLER_H_