Move chrome/browser/ash/login/quick_unlock/ to namespace ash
The migration of chromeos/browser/chromeos/login/quick_unlock/ was
finished in https://crrev.com/c/2721915. 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: I6b5c7315a09cf86d1134b7af1eb15e1d0d92ee7d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3017877
Commit-Queue: Henrique Ferreiro <[email protected]>
Reviewed-by: Hidehiko Abe <[email protected]>
Owners-Override: Hidehiko Abe <[email protected]>
Cr-Commit-Position: refs/heads/master@{#902927}
diff --git a/chrome/browser/ash/login/quick_unlock/auth_token.cc b/chrome/browser/ash/login/quick_unlock/auth_token.cc
index ffba2d0..de85052 100644
--- a/chrome/browser/ash/login/quick_unlock/auth_token.cc
+++ b/chrome/browser/ash/login/quick_unlock/auth_token.cc
@@ -9,7 +9,7 @@
#include "base/threading/thread_task_runner_handle.h"
#include "chromeos/login/auth/user_context.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
const int AuthToken::kTokenExpirationSeconds = 5 * 60;
@@ -44,4 +44,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/auth_token.h b/chrome/browser/ash/login/quick_unlock/auth_token.h
index c77b8e6..119d5dd 100644
--- a/chrome/browser/ash/login/quick_unlock/auth_token.h
+++ b/chrome/browser/ash/login/quick_unlock/auth_token.h
@@ -15,7 +15,9 @@
namespace chromeos {
class UserContext;
+}
+namespace ash {
namespace quick_unlock {
// Security token with an identifyier string and a predetermined life time,
@@ -59,14 +61,14 @@
};
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
// source migration is finished.
-namespace ash {
+namespace chromeos {
namespace quick_unlock {
-using ::chromeos::quick_unlock::AuthToken;
+using ::ash::quick_unlock::AuthToken;
}
-} // namespace ash
+} // namespace chromeos
#endif // CHROME_BROWSER_ASH_LOGIN_QUICK_UNLOCK_AUTH_TOKEN_H_
diff --git a/chrome/browser/ash/login/quick_unlock/fingerprint_storage.cc b/chrome/browser/ash/login/quick_unlock/fingerprint_storage.cc
index dad7ec3..46d9f2b 100644
--- a/chrome/browser/ash/login/quick_unlock/fingerprint_storage.cc
+++ b/chrome/browser/ash/login/quick_unlock/fingerprint_storage.cc
@@ -16,9 +16,8 @@
#include "content/public/browser/device_service.h"
#include "services/device/public/mojom/fingerprint.mojom.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
-
namespace {
constexpr char kFingerprintUMAFeatureName[] = "Fingerprint";
@@ -143,4 +142,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/fingerprint_storage.h b/chrome/browser/ash/login/quick_unlock/fingerprint_storage.h
index 245c782..490d6bd2 100644
--- a/chrome/browser/ash/login/quick_unlock/fingerprint_storage.h
+++ b/chrome/browser/ash/login/quick_unlock/fingerprint_storage.h
@@ -13,10 +13,9 @@
class PrefRegistrySimple;
class Profile;
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
class FingerprintMetricsReporter;
-class QuickUnlockStorage;
// The result of fingerprint auth attempt on the lock screen. These values are
// persisted to logs. Entries should not be renumbered and numeric values
@@ -92,14 +91,14 @@
};
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
// source migration is finished.
-namespace ash {
+namespace chromeos {
namespace quick_unlock {
-using ::chromeos::quick_unlock::FingerprintUnlockResult;
+using ::ash::quick_unlock::FingerprintUnlockResult;
}
-} // namespace ash
+} // namespace chromeos
#endif // CHROME_BROWSER_ASH_LOGIN_QUICK_UNLOCK_FINGERPRINT_STORAGE_H_
diff --git a/chrome/browser/ash/login/quick_unlock/fingerprint_storage_unittest.cc b/chrome/browser/ash/login/quick_unlock/fingerprint_storage_unittest.cc
index b50794e..3ab4723 100644
--- a/chrome/browser/ash/login/quick_unlock/fingerprint_storage_unittest.cc
+++ b/chrome/browser/ash/login/quick_unlock/fingerprint_storage_unittest.cc
@@ -15,7 +15,7 @@
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
namespace {
@@ -111,4 +111,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/pin_backend.cc b/chrome/browser/ash/login/quick_unlock/pin_backend.cc
index 7cd7ffc6..2747139 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_backend.cc
+++ b/chrome/browser/ash/login/quick_unlock/pin_backend.cc
@@ -26,9 +26,8 @@
#include "components/user_manager/known_user.h"
#include "crypto/random.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
-
namespace {
constexpr int kSaltByteSize = 16;
@@ -219,7 +218,7 @@
// If the preference is not user controllable, the auto submit dialog
// isn't available in Settings, so we return a failure.
if (!PrefService(account_id)
- ->IsUserModifiablePreference(prefs::kPinUnlockAutosubmitEnabled)) {
+ ->IsUserModifiablePreference(::prefs::kPinUnlockAutosubmitEnabled)) {
PostResponse(std::move(did_set), false);
return;
}
@@ -233,7 +232,7 @@
} else {
user_manager::known_user::SetUserPinLength(account_id, 0);
PrefService(account_id)
- ->SetBoolean(prefs::kPinUnlockAutosubmitEnabled, false);
+ ->SetBoolean(::prefs::kPinUnlockAutosubmitEnabled, false);
PostResponse(std::move(did_set), true);
}
}
@@ -346,7 +345,7 @@
// example, via policy. Disabling auto submit through Settings clears it
// immediately.
if (!PrefService(account_id)
- ->GetBoolean(prefs::kPinUnlockAutosubmitEnabled)) {
+ ->GetBoolean(::prefs::kPinUnlockAutosubmitEnabled)) {
user_manager::known_user::SetUserPinLength(account_id, 0);
return 0;
}
@@ -393,14 +392,12 @@
user_manager::known_user::SetUserPinLength(account_id,
success ? pin_length : 0);
PrefService(account_id)
- ->SetBoolean(prefs::kPinUnlockAutosubmitEnabled, success);
+ ->SetBoolean(::prefs::kPinUnlockAutosubmitEnabled, success);
PostResponse(std::move(result), success);
}
PrefService* PinBackend::PrefService(const AccountId& account_id) {
- return chromeos::ProfileHelper::Get()
- ->GetProfileByAccountId(account_id)
- ->GetPrefs();
+ return ProfileHelper::Get()->GetProfileByAccountId(account_id)->GetPrefs();
}
void PinBackend::UpdatePinAutosubmitOnSet(const AccountId& account_id,
@@ -413,7 +410,8 @@
user_manager::known_user::PinAutosubmitSetBackfillNotNeeded(account_id);
const bool autosubmit_enabled =
- PrefService(account_id)->GetBoolean(prefs::kPinUnlockAutosubmitEnabled) &&
+ PrefService(account_id)
+ ->GetBoolean(::prefs::kPinUnlockAutosubmitEnabled) &&
pin_length <= kPinAutosubmitMaxPinLength;
// Explicitly set the user pref to false if the PIN is longer than 12 digits
@@ -421,7 +419,7 @@
// tries to enable the toggle with a long pin an error is shown.
if (pin_length > kPinAutosubmitMaxPinLength) {
PrefService(account_id)
- ->SetBoolean(prefs::kPinUnlockAutosubmitEnabled, false);
+ ->SetBoolean(::prefs::kPinUnlockAutosubmitEnabled, false);
}
// Expose the true PIN length if enabled
@@ -433,7 +431,7 @@
if (!features::IsPinAutosubmitFeatureEnabled())
return;
user_manager::known_user::SetUserPinLength(account_id, 0);
- PrefService(account_id)->ClearPref(prefs::kPinUnlockAutosubmitEnabled);
+ PrefService(account_id)->ClearPref(::prefs::kPinUnlockAutosubmitEnabled);
}
void PinBackend::UpdatePinAutosubmitOnSuccessfulTryAuth(
@@ -447,7 +445,8 @@
PinAutosubmitBackfill(account_id, pin_length);
const bool autosubmit_enabled =
- PrefService(account_id)->GetBoolean(prefs::kPinUnlockAutosubmitEnabled) &&
+ PrefService(account_id)
+ ->GetBoolean(::prefs::kPinUnlockAutosubmitEnabled) &&
pin_length <= kPinAutosubmitMaxPinLength;
if (autosubmit_enabled)
user_manager::known_user::SetUserPinLength(account_id, pin_length);
@@ -467,17 +466,17 @@
// Dont backfill if there is a user value set for the pref.
if (PrefService(account_id)
- ->GetUserPrefValue(prefs::kPinUnlockAutosubmitEnabled) != nullptr)
+ ->GetUserPrefValue(::prefs::kPinUnlockAutosubmitEnabled) != nullptr)
return;
// Disabled if not allowed by policy. Since 'kPinUnlockAutosubmitEnabled'
// is enabled by default, it is only false when recommended/mandatory by
// policy.
if (!PrefService(account_id)
- ->GetBoolean(prefs::kPinUnlockAutosubmitEnabled)) {
+ ->GetBoolean(::prefs::kPinUnlockAutosubmitEnabled)) {
RecordUMAHistogram(BackfillEvent::kDisabledDueToPolicy);
PrefService(account_id)
- ->SetBoolean(prefs::kPinUnlockAutosubmitEnabled, false);
+ ->SetBoolean(::prefs::kPinUnlockAutosubmitEnabled, false);
return;
}
@@ -485,13 +484,13 @@
if (pin_length != kPinAutosubmitBackfillLength) {
RecordUMAHistogram(BackfillEvent::kDisabledDueToPinLength);
PrefService(account_id)
- ->SetBoolean(prefs::kPinUnlockAutosubmitEnabled, false);
+ ->SetBoolean(::prefs::kPinUnlockAutosubmitEnabled, false);
} else {
RecordUMAHistogram(BackfillEvent::kEnabled);
PrefService(account_id)
- ->SetBoolean(prefs::kPinUnlockAutosubmitEnabled, true);
+ ->SetBoolean(::prefs::kPinUnlockAutosubmitEnabled, true);
}
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/pin_backend.h b/chrome/browser/ash/login/quick_unlock/pin_backend.h
index 6a14308f..3aeb80b 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_backend.h
+++ b/chrome/browser/ash/login/quick_unlock/pin_backend.h
@@ -15,10 +15,8 @@
class Profile;
class ScopedKeepAlive;
-namespace chromeos {
-
+namespace ash {
namespace quick_unlock {
-
class PinStorageCryptohome;
// Provides high-level access to the user's PIN. The underlying storage can be
@@ -177,14 +175,14 @@
};
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
// source migration is finished.
-namespace ash {
+namespace chromeos {
namespace quick_unlock {
-using ::chromeos::quick_unlock::PinBackend;
+using ::ash::quick_unlock::PinBackend;
}
-} // namespace ash
+} // namespace chromeos
#endif // CHROME_BROWSER_ASH_LOGIN_QUICK_UNLOCK_PIN_BACKEND_H_
diff --git a/chrome/browser/ash/login/quick_unlock/pin_migration_browsertest.cc b/chrome/browser/ash/login/quick_unlock/pin_migration_browsertest.cc
index f68ce05..e3f3686 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_migration_browsertest.cc
+++ b/chrome/browser/ash/login/quick_unlock/pin_migration_browsertest.cc
@@ -16,7 +16,7 @@
#include "content/public/test/browser_test.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
namespace {
@@ -100,4 +100,4 @@
} // namespace
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.cc b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.cc
index 5d08165..ace83cc4 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.cc
+++ b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.cc
@@ -20,23 +20,22 @@
#include "components/account_id/account_id.h"
#include "components/user_manager/known_user.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
-
namespace {
// Read the salt from local state.
std::string GetSalt(const AccountId& account_id) {
std::string salt;
- user_manager::known_user::GetStringPref(
- account_id, ash::prefs::kQuickUnlockPinSalt, &salt);
+ user_manager::known_user::GetStringPref(account_id,
+ prefs::kQuickUnlockPinSalt, &salt);
return salt;
}
// Write the salt to local state.
void WriteSalt(const AccountId& account_id, const std::string& salt) {
- user_manager::known_user::SetStringPref(
- account_id, ash::prefs::kQuickUnlockPinSalt, salt);
+ user_manager::known_user::SetStringPref(account_id,
+ prefs::kQuickUnlockPinSalt, salt);
}
template <typename ReplyType>
@@ -290,4 +289,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.h b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.h
index 8042c9d..ca05e48 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.h
+++ b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome.h
@@ -9,15 +9,13 @@
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
+// TODO(https://crbug.com/1164001): move to forward declaration
#include "chromeos/login/auth/user_context.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
class AccountId;
-namespace chromeos {
-
-class UserContext;
-
+namespace ash {
namespace quick_unlock {
class PinStorageCryptohome {
@@ -62,6 +60,14 @@
};
} // namespace quick_unlock
+} // namespace ash
+
+// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
+// source migration is finished.
+namespace chromeos {
+namespace quick_unlock {
+using ::ash::quick_unlock::PinStorageCryptohome;
+}
} // namespace chromeos
#endif // CHROME_BROWSER_ASH_LOGIN_QUICK_UNLOCK_PIN_STORAGE_CRYPTOHOME_H_
diff --git a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome_unittest.cc b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome_unittest.cc
index 19704403..c3d30365 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome_unittest.cc
+++ b/chrome/browser/ash/login/quick_unlock/pin_storage_cryptohome_unittest.cc
@@ -21,9 +21,8 @@
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
-
namespace {
constexpr char kDummyPin[] = "123456";
@@ -35,7 +34,7 @@
// testing::Test:
void SetUp() override {
- quick_unlock::EnabledForTesting(true);
+ EnabledForTesting(true);
SystemSaltGetter::Initialize();
CryptohomeMiscClient::InitializeFake();
UserDataAuthClient::InitializeFake();
@@ -47,8 +46,8 @@
UserDataAuthClient::Shutdown();
CryptohomeMiscClient::Shutdown();
SystemSaltGetter::Shutdown();
- quick_unlock::EnabledForTesting(false);
- quick_unlock::IsFingerprintEnabled(nullptr);
+ EnabledForTesting(false);
+ IsFingerprintEnabled(nullptr);
}
bool IsPinSet() const {
@@ -227,4 +226,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/pin_storage_prefs.cc b/chrome/browser/ash/login/quick_unlock/pin_storage_prefs.cc
index 002476c..04f37c4 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_storage_prefs.cc
+++ b/chrome/browser/ash/login/quick_unlock/pin_storage_prefs.cc
@@ -10,12 +10,12 @@
#include "components/prefs/pref_registry_simple.h"
#include "components/prefs/pref_service.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
// static
void PinStoragePrefs::RegisterProfilePrefs(PrefRegistrySimple* registry) {
- registry->RegisterStringPref(ash::prefs::kQuickUnlockPinSalt, "");
+ registry->RegisterStringPref(prefs::kQuickUnlockPinSalt, "");
registry->RegisterStringPref(prefs::kQuickUnlockPinSecret, "");
}
@@ -41,17 +41,17 @@
const std::string secret =
PinBackend::ComputeSecret(pin, salt, Key::KEY_TYPE_PASSWORD_PLAIN);
- pref_service_->SetString(ash::prefs::kQuickUnlockPinSalt, salt);
+ pref_service_->SetString(prefs::kQuickUnlockPinSalt, salt);
pref_service_->SetString(prefs::kQuickUnlockPinSecret, secret);
}
void PinStoragePrefs::RemovePin() {
- pref_service_->SetString(ash::prefs::kQuickUnlockPinSalt, "");
+ pref_service_->SetString(prefs::kQuickUnlockPinSalt, "");
pref_service_->SetString(prefs::kQuickUnlockPinSecret, "");
}
std::string PinStoragePrefs::PinSalt() const {
- return pref_service_->GetString(ash::prefs::kQuickUnlockPinSalt);
+ return pref_service_->GetString(prefs::kQuickUnlockPinSalt);
}
std::string PinStoragePrefs::PinSecret() const {
@@ -76,4 +76,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/pin_storage_prefs.h b/chrome/browser/ash/login/quick_unlock/pin_storage_prefs.h
index 8a3b35a..9978fd9 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_storage_prefs.h
+++ b/chrome/browser/ash/login/quick_unlock/pin_storage_prefs.h
@@ -14,7 +14,7 @@
class PrefRegistrySimple;
class PrefService;
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
class PinStoragePrefs {
@@ -62,6 +62,6 @@
};
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
#endif // CHROME_BROWSER_ASH_LOGIN_QUICK_UNLOCK_PIN_STORAGE_PREFS_H_
diff --git a/chrome/browser/ash/login/quick_unlock/pin_storage_prefs_unittest.cc b/chrome/browser/ash/login/quick_unlock/pin_storage_prefs_unittest.cc
index 48ccf76..c6ec2a1 100644
--- a/chrome/browser/ash/login/quick_unlock/pin_storage_prefs_unittest.cc
+++ b/chrome/browser/ash/login/quick_unlock/pin_storage_prefs_unittest.cc
@@ -14,7 +14,7 @@
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
namespace {
@@ -72,7 +72,7 @@
TEST_F(PinStoragePrefsUnitTest, PinStorageWritesToPrefs) {
PrefService* prefs = profile_->GetPrefs();
- EXPECT_EQ("", prefs->GetString(ash::prefs::kQuickUnlockPinSalt));
+ EXPECT_EQ("", prefs->GetString(prefs::kQuickUnlockPinSalt));
EXPECT_EQ("", prefs->GetString(prefs::kQuickUnlockPinSecret));
PinStoragePrefsTestApi pin_storage_test(PinStoragePrefs());
@@ -80,7 +80,7 @@
PinStoragePrefs()->SetPin("1111");
EXPECT_TRUE(PinStoragePrefs()->IsPinSet());
EXPECT_EQ(pin_storage_test.PinSalt(),
- prefs->GetString(ash::prefs::kQuickUnlockPinSalt));
+ prefs->GetString(prefs::kQuickUnlockPinSalt));
EXPECT_EQ(pin_storage_test.PinSecret(),
prefs->GetString(prefs::kQuickUnlockPinSecret));
EXPECT_NE("", pin_storage_test.PinSalt());
@@ -88,7 +88,7 @@
PinStoragePrefs()->RemovePin();
EXPECT_FALSE(PinStoragePrefs()->IsPinSet());
- EXPECT_EQ("", prefs->GetString(ash::prefs::kQuickUnlockPinSalt));
+ EXPECT_EQ("", prefs->GetString(prefs::kQuickUnlockPinSalt));
EXPECT_EQ("", prefs->GetString(prefs::kQuickUnlockPinSecret));
}
@@ -156,4 +156,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/quick_unlock_factory.cc b/chrome/browser/ash/login/quick_unlock/quick_unlock_factory.cc
index f6854c65..3f83b1c 100644
--- a/chrome/browser/ash/login/quick_unlock/quick_unlock_factory.cc
+++ b/chrome/browser/ash/login/quick_unlock/quick_unlock_factory.cc
@@ -11,7 +11,7 @@
#include "components/user_manager/user.h"
#include "components/user_manager/user_manager.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
// static
@@ -59,4 +59,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/quick_unlock_factory.h b/chrome/browser/ash/login/quick_unlock/quick_unlock_factory.h
index 073c7b1..07050077 100644
--- a/chrome/browser/ash/login/quick_unlock/quick_unlock_factory.h
+++ b/chrome/browser/ash/login/quick_unlock/quick_unlock_factory.h
@@ -15,9 +15,8 @@
class User;
}
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
-
class QuickUnlockStorage;
// Singleton that owns all QuickUnlockStorage instances and associates them with
@@ -53,14 +52,14 @@
};
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
// source migration is finished.
-namespace ash {
+namespace chromeos {
namespace quick_unlock {
-using ::chromeos::quick_unlock::QuickUnlockFactory;
+using ::ash::quick_unlock::QuickUnlockFactory;
}
-} // namespace ash
+} // namespace chromeos
#endif // CHROME_BROWSER_ASH_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_FACTORY_H_
diff --git a/chrome/browser/ash/login/quick_unlock/quick_unlock_storage.cc b/chrome/browser/ash/login/quick_unlock/quick_unlock_storage.cc
index 4a57719..29ca967c 100644
--- a/chrome/browser/ash/login/quick_unlock/quick_unlock_storage.cc
+++ b/chrome/browser/ash/login/quick_unlock/quick_unlock_storage.cc
@@ -15,9 +15,8 @@
#include "chrome/browser/profiles/profile.h"
#include "components/prefs/pref_service.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
-
namespace {
base::TimeDelta GetStrongAuthTimeout(PrefService* pref_service) {
@@ -101,4 +100,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/quick_unlock_storage.h b/chrome/browser/ash/login/quick_unlock/quick_unlock_storage.h
index d5d8801c4..c13f664 100644
--- a/chrome/browser/ash/login/quick_unlock/quick_unlock_storage.h
+++ b/chrome/browser/ash/login/quick_unlock/quick_unlock_storage.h
@@ -12,7 +12,7 @@
class Profile;
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
class AuthToken;
class FingerprintStorage;
@@ -97,14 +97,14 @@
};
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
// source migration is finished.
-namespace ash {
+namespace chromeos {
namespace quick_unlock {
-using ::chromeos::quick_unlock::QuickUnlockStorage;
+using ::ash::quick_unlock::QuickUnlockStorage;
}
-} // namespace ash
+} // namespace chromeos
#endif // CHROME_BROWSER_ASH_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_STORAGE_H_
diff --git a/chrome/browser/ash/login/quick_unlock/quick_unlock_storage_unittest.cc b/chrome/browser/ash/login/quick_unlock/quick_unlock_storage_unittest.cc
index 85173c9..168c8966 100644
--- a/chrome/browser/ash/login/quick_unlock/quick_unlock_storage_unittest.cc
+++ b/chrome/browser/ash/login/quick_unlock/quick_unlock_storage_unittest.cc
@@ -19,7 +19,7 @@
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
namespace {
@@ -176,4 +176,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/quick_unlock_utils.cc b/chrome/browser/ash/login/quick_unlock/quick_unlock_utils.cc
index 08bc29e..b3847b3 100644
--- a/chrome/browser/ash/login/quick_unlock/quick_unlock_utils.cc
+++ b/chrome/browser/ash/login/quick_unlock/quick_unlock_utils.cc
@@ -23,10 +23,10 @@
#include "content/public/browser/web_ui_data_source.h"
#include "services/network/public/mojom/content_security_policy.mojom.h"
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
-
namespace {
+
// Quick unlock is enabled regardless of flags.
bool enable_for_testing_ = false;
bool disable_pin_by_policy_for_testing_ = false;
@@ -222,4 +222,4 @@
}
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
diff --git a/chrome/browser/ash/login/quick_unlock/quick_unlock_utils.h b/chrome/browser/ash/login/quick_unlock/quick_unlock_utils.h
index 9cf7858..547894b 100644
--- a/chrome/browser/ash/login/quick_unlock/quick_unlock_utils.h
+++ b/chrome/browser/ash/login/quick_unlock/quick_unlock_utils.h
@@ -17,7 +17,7 @@
class PrefService;
class Profile;
-namespace chromeos {
+namespace ash {
namespace quick_unlock {
// Enumeration specifying the possible intervals before a strong auth
@@ -82,19 +82,21 @@
void AddFingerprintResources(content::WebUIDataSource* html_source);
} // namespace quick_unlock
-} // namespace chromeos
+} // namespace ash
// TODO(https://crbug.com/1164001): remove after the //chrome/browser/chromeos
// source migration is finished.
-namespace ash {
+namespace chromeos {
namespace quick_unlock {
-using ::chromeos::quick_unlock::DisablePinByPolicyForTesting;
-using ::chromeos::quick_unlock::EnabledForTesting;
-using ::chromeos::quick_unlock::IsPinDisabledByPolicy;
-using ::chromeos::quick_unlock::IsPinEnabled;
-using ::chromeos::quick_unlock::PasswordConfirmationFrequency;
-using ::chromeos::quick_unlock::PasswordConfirmationFrequencyToTimeDelta;
+using ::ash::quick_unlock::AddFingerprintResources;
+using ::ash::quick_unlock::DisablePinByPolicyForTesting;
+using ::ash::quick_unlock::EnabledForTesting;
+using ::ash::quick_unlock::FingerprintLocation;
+using ::ash::quick_unlock::GetFingerprintLocation;
+using ::ash::quick_unlock::IsFingerprintEnabled;
+using ::ash::quick_unlock::IsPinDisabledByPolicy;
+using ::ash::quick_unlock::IsPinEnabled;
} // namespace quick_unlock
-} // namespace ash
+} // namespace chromeos
#endif // CHROME_BROWSER_ASH_LOGIN_QUICK_UNLOCK_QUICK_UNLOCK_UTILS_H_
diff --git a/chrome/browser/ash/login/screens/fingerprint_setup_screen.cc b/chrome/browser/ash/login/screens/fingerprint_setup_screen.cc
index 42a6c06..151a474b 100644
--- a/chrome/browser/ash/login/screens/fingerprint_setup_screen.cc
+++ b/chrome/browser/ash/login/screens/fingerprint_setup_screen.cc
@@ -120,7 +120,7 @@
}
bool FingerprintSetupScreen::MaybeSkip(WizardContext* context) {
- if (!chromeos::quick_unlock::IsFingerprintEnabled(
+ if (!quick_unlock::IsFingerprintEnabled(
ProfileManager::GetActiveUserProfile()) ||
chrome_user_manager_util::IsPublicSessionOrEphemeralLogin()) {
exit_callback_.Run(Result::NOT_APPLICABLE);
diff --git a/chrome/browser/ash/login/screens/pin_setup_screen.cc b/chrome/browser/ash/login/screens/pin_setup_screen.cc
index c6626cc..322f76c 100644
--- a/chrome/browser/ash/login/screens/pin_setup_screen.cc
+++ b/chrome/browser/ash/login/screens/pin_setup_screen.cc
@@ -175,11 +175,11 @@
token_lifetime_timeout_.Start(
FROM_HERE,
base::TimeDelta::FromSeconds(
- chromeos::quick_unlock::AuthToken::kTokenExpirationSeconds),
+ quick_unlock::AuthToken::kTokenExpirationSeconds),
base::BindOnce(&PinSetupScreen::OnTokenTimedOut,
weak_ptr_factory_.GetWeakPtr()));
- chromeos::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
- chromeos::quick_unlock::QuickUnlockFactory::GetForProfile(
+ quick_unlock::QuickUnlockStorage* quick_unlock_storage =
+ quick_unlock::QuickUnlockFactory::GetForProfile(
ProfileManager::GetActiveUserProfile());
quick_unlock_storage->MarkStrongAuth();
std::unique_ptr<UserContext> user_context =
@@ -198,9 +198,8 @@
if (view_)
view_->Show(token, is_child_account);
- chromeos::quick_unlock::PinBackend::GetInstance()->HasLoginSupport(
- base::BindOnce(&PinSetupScreen::OnHasLoginSupport,
- weak_ptr_factory_.GetWeakPtr()));
+ quick_unlock::PinBackend::GetInstance()->HasLoginSupport(base::BindOnce(
+ &PinSetupScreen::OnHasLoginSupport, weak_ptr_factory_.GetWeakPtr()));
}
void PinSetupScreen::HideImpl() {
diff --git a/chrome/browser/ash/web_applications/help_app/help_app_untrusted_ui_config.cc b/chrome/browser/ash/web_applications/help_app/help_app_untrusted_ui_config.cc
index 736e1022..fe320bb6f 100644
--- a/chrome/browser/ash/web_applications/help_app/help_app_untrusted_ui_config.cc
+++ b/chrome/browser/ash/web_applications/help_app/help_app_untrusted_ui_config.cc
@@ -127,7 +127,7 @@
ash::AssistantState::Get()->settings_enabled().value_or(false));
source->AddBoolean("playStoreEnabled",
arc::IsArcPlayStoreEnabledForProfile(profile));
- source->AddBoolean("pinEnabled", chromeos::quick_unlock::IsPinEnabled());
+ source->AddBoolean("pinEnabled", ash::quick_unlock::IsPinEnabled());
// Data about what type of account/login this is.
user_manager::UserManager* user_manager = user_manager::UserManager::Get();
diff --git a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.cc b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.cc
index d631e77..c30ad04 100644
--- a/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.cc
+++ b/chrome/browser/chromeos/extensions/quick_unlock_private/quick_unlock_private_api.cc
@@ -45,9 +45,9 @@
using CredentialRequirements = quick_unlock_private::CredentialRequirements;
using QuickUnlockMode = quick_unlock_private::QuickUnlockMode;
-using AuthToken = chromeos::quick_unlock::AuthToken;
+using AuthToken = ash::quick_unlock::AuthToken;
using QuickUnlockModeList = std::vector<QuickUnlockMode>;
-using QuickUnlockStorage = chromeos::quick_unlock::QuickUnlockStorage;
+using QuickUnlockStorage = ash::quick_unlock::QuickUnlockStorage;
using ActiveModeCallback = base::OnceCallback<void(const QuickUnlockModeList&)>;
@@ -82,7 +82,7 @@
void ComputeActiveModes(Profile* profile, ActiveModeCallback result) {
user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
- chromeos::quick_unlock::PinBackend::GetInstance()->IsSet(
+ ash::quick_unlock::PinBackend::GetInstance()->IsSet(
user->GetAccountId(),
base::BindOnce(
[](ActiveModeCallback result, bool is_set) {
@@ -202,7 +202,7 @@
}
AuthToken* GetActiveProfileAuthToken(content::BrowserContext* browser_context) {
- return chromeos::quick_unlock::QuickUnlockFactory::GetForProfile(
+ return ash::quick_unlock::QuickUnlockFactory::GetForProfile(
GetActiveProfile(browser_context))
->GetAuthToken();
}
@@ -276,7 +276,7 @@
Profile* profile = GetActiveProfile(browser_context());
QuickUnlockStorage* quick_unlock_storage =
- chromeos::quick_unlock::QuickUnlockFactory::GetForProfile(profile);
+ ash::quick_unlock::QuickUnlockFactory::GetForProfile(profile);
quick_unlock_storage->MarkStrongAuth();
result->token = quick_unlock_storage->CreateAuthToken(user_context);
result->lifetime_seconds = AuthToken::kTokenExpirationSeconds;
@@ -342,7 +342,7 @@
user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
- chromeos::quick_unlock::PinBackend::GetInstance()->SetPinAutoSubmitEnabled(
+ ash::quick_unlock::PinBackend::GetInstance()->SetPinAutoSubmitEnabled(
user->GetAccountId(), params->pin, params->enabled,
base::BindOnce(&QuickUnlockPrivateSetPinAutosubmitEnabledFunction::
HandleSetPinAutoSubmitResult,
@@ -376,7 +376,7 @@
user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
- chromeos::quick_unlock::PinBackend::GetInstance()->CanAuthenticate(
+ ash::quick_unlock::PinBackend::GetInstance()->CanAuthenticate(
user->GetAccountId(),
base::BindOnce(&QuickUnlockPrivateCanAuthenticatePinFunction::
HandleCanAuthenticateResult,
@@ -402,7 +402,7 @@
ExtensionFunction::ResponseAction
QuickUnlockPrivateGetAvailableModesFunction::Run() {
QuickUnlockModeList modes;
- if (!chromeos::quick_unlock::IsPinDisabledByPolicy(
+ if (!ash::quick_unlock::IsPinDisabledByPolicy(
GetActiveProfile(browser_context())->GetPrefs())) {
modes.push_back(quick_unlock_private::QUICK_UNLOCK_MODE_PIN);
}
@@ -539,7 +539,7 @@
// on the UI, but users can still reach here via dev tools.
for (size_t i = 0; i < params_->modes.size(); ++i) {
if (params_->modes[i] == QuickUnlockMode::QUICK_UNLOCK_MODE_PIN &&
- chromeos::quick_unlock::IsPinDisabledByPolicy(pref_service)) {
+ ash::quick_unlock::IsPinDisabledByPolicy(pref_service)) {
return RespondNow(Error(kPinDisabledByPolicy));
}
}
@@ -606,13 +606,13 @@
user_manager::User* user =
chromeos::ProfileHelper::Get()->GetUserByProfile(profile);
if (pin_credential.empty()) {
- chromeos::quick_unlock::PinBackend::GetInstance()->Remove(
+ ash::quick_unlock::PinBackend::GetInstance()->Remove(
user->GetAccountId(), params_->token,
base::BindOnce(
&QuickUnlockPrivateSetModesFunction::PinRemoveCallComplete,
this));
} else {
- chromeos::quick_unlock::PinBackend::GetInstance()->Set(
+ ash::quick_unlock::PinBackend::GetInstance()->Set(
user->GetAccountId(), params_->token, pin_credential,
base::BindOnce(
&QuickUnlockPrivateSetModesFunction::PinSetCallComplete, this));
diff --git a/chrome/browser/chromeos/multidevice_setup/auth_token_validator_factory.cc b/chrome/browser/chromeos/multidevice_setup/auth_token_validator_factory.cc
index 3daee76..6f1d78b 100644
--- a/chrome/browser/chromeos/multidevice_setup/auth_token_validator_factory.cc
+++ b/chrome/browser/chromeos/multidevice_setup/auth_token_validator_factory.cc
@@ -37,7 +37,7 @@
KeyedService* AuthTokenValidatorFactory::BuildServiceInstanceFor(
content::BrowserContext* context) const {
return new AuthTokenValidatorImpl(
- chromeos::quick_unlock::QuickUnlockFactory::GetForProfile(
+ quick_unlock::QuickUnlockFactory::GetForProfile(
Profile::FromBrowserContext(context)));
}
diff --git a/chrome/browser/chromeos/multidevice_setup/auth_token_validator_impl.h b/chrome/browser/chromeos/multidevice_setup/auth_token_validator_impl.h
index f3777d8..754de12 100644
--- a/chrome/browser/chromeos/multidevice_setup/auth_token_validator_impl.h
+++ b/chrome/browser/chromeos/multidevice_setup/auth_token_validator_impl.h
@@ -5,15 +5,12 @@
#ifndef CHROME_BROWSER_CHROMEOS_MULTIDEVICE_SETUP_AUTH_TOKEN_VALIDATOR_IMPL_H_
#define CHROME_BROWSER_CHROMEOS_MULTIDEVICE_SETUP_AUTH_TOKEN_VALIDATOR_IMPL_H_
+// TODO(https://crbug.com/1164001): move to forward declaration.
+#include "chrome/browser/ash/login/quick_unlock/quick_unlock_storage.h"
#include "chromeos/services/multidevice_setup/public/cpp/auth_token_validator.h"
#include "components/keyed_service/core/keyed_service.h"
namespace chromeos {
-
-namespace quick_unlock {
-class QuickUnlockStorage;
-} // namespace quick_unlock
-
namespace multidevice_setup {
// Concrete AuthTokenValidator implementation.
diff --git a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc
index 56c80cb..b03e48a 100644
--- a/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc
+++ b/chrome/browser/extensions/api/passwords_private/passwords_private_delegate_impl.cc
@@ -342,9 +342,9 @@
->GetAccountId());
if (user_cannot_manually_enter_password)
return true;
- chromeos::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
- chromeos::quick_unlock::QuickUnlockFactory::GetForProfile(profile_);
- const chromeos::quick_unlock::AuthToken* auth_token =
+ ash::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
+ ash::quick_unlock::QuickUnlockFactory::GetForProfile(profile_);
+ const ash::quick_unlock::AuthToken* auth_token =
quick_unlock_storage->GetAuthToken();
if (!auth_token || !auth_token->GetAge())
return false;
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 9415600..69791f0 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -1267,13 +1267,13 @@
chromeos::NetworkMetadataStore::RegisterPrefs(registry);
ash::ReleaseNotesStorage::RegisterProfilePrefs(registry);
chromeos::HelpAppNotificationController::RegisterProfilePrefs(registry);
- chromeos::quick_unlock::FingerprintStorage::RegisterProfilePrefs(registry);
- chromeos::quick_unlock::PinStoragePrefs::RegisterProfilePrefs(registry);
+ ash::quick_unlock::FingerprintStorage::RegisterProfilePrefs(registry);
+ ash::quick_unlock::PinStoragePrefs::RegisterProfilePrefs(registry);
chromeos::Preferences::RegisterProfilePrefs(registry);
chromeos::EnterprisePrintersProvider::RegisterProfilePrefs(registry);
ash::parent_access::ParentAccessService::RegisterProfilePrefs(registry);
chromeos::quick_answers::prefs::RegisterProfilePrefs(registry);
- chromeos::quick_unlock::RegisterProfilePrefs(registry);
+ ash::quick_unlock::RegisterProfilePrefs(registry);
chromeos::RegisterSamlProfilePrefs(registry);
ash::ScreenTimeController::RegisterProfilePrefs(registry);
SecondaryAccountConsentLogger::RegisterPrefs(registry);
diff --git a/chrome/browser/ui/ash/in_session_auth_dialog_client.cc b/chrome/browser/ui/ash/in_session_auth_dialog_client.cc
index a1a8ab9..f9b9df70 100644
--- a/chrome/browser/ui/ash/in_session_auth_dialog_client.cc
+++ b/chrome/browser/ui/ash/in_session_auth_dialog_client.cc
@@ -65,8 +65,8 @@
bool InSessionAuthDialogClient::IsFingerprintAuthAvailable(
const AccountId& account_id) {
- chromeos::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
- chromeos::quick_unlock::QuickUnlockFactory::GetForAccountId(account_id);
+ ash::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
+ ash::quick_unlock::QuickUnlockFactory::GetForAccountId(account_id);
return quick_unlock_storage &&
quick_unlock_storage->fingerprint_storage()->IsFingerprintAvailable();
}
@@ -95,7 +95,7 @@
const AccountId& account_id,
base::OnceCallback<void(bool)> callback) {
// PinBackend may be using cryptohome backend or prefs backend.
- chromeos::quick_unlock::PinBackend::GetInstance()->CanAuthenticate(
+ ash::quick_unlock::PinBackend::GetInstance()->CanAuthenticate(
account_id, std::move(callback));
}
@@ -125,7 +125,7 @@
pending_auth_state_.emplace(std::move(callback));
if (authenticated_by_pin) {
- chromeos::quick_unlock::PinBackend::GetInstance()->TryAuthenticate(
+ ash::quick_unlock::PinBackend::GetInstance()->TryAuthenticate(
user_context.GetAccountId(), *user_context.GetKey(),
base::BindOnce(&InSessionAuthDialogClient::OnPinAttemptDone,
weak_factory_.GetWeakPtr(), user_context));
@@ -142,10 +142,10 @@
bool success) {
if (success) {
// Mark strong auth if this is cryptohome based pin.
- if (chromeos::quick_unlock::PinBackend::GetInstance()->ShouldUseCryptohome(
+ if (ash::quick_unlock::PinBackend::GetInstance()->ShouldUseCryptohome(
user_context.GetAccountId())) {
- chromeos::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
- chromeos::quick_unlock::QuickUnlockFactory::GetForAccountId(
+ ash::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
+ ash::quick_unlock::QuickUnlockFactory::GetForAccountId(
user_context.GetAccountId());
if (quick_unlock_storage)
quick_unlock_storage->MarkStrongAuth();
@@ -175,8 +175,8 @@
void InSessionAuthDialogClient::OnPasswordAuthSuccess(
const UserContext& user_context) {
- chromeos::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
- chromeos::quick_unlock::QuickUnlockFactory::GetForAccountId(
+ ash::quick_unlock::QuickUnlockStorage* quick_unlock_storage =
+ ash::quick_unlock::QuickUnlockFactory::GetForAccountId(
user_context.GetAccountId());
if (quick_unlock_storage)
quick_unlock_storage->MarkStrongAuth();
diff --git a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
index 697cd9d2..a38c684 100644
--- a/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
+++ b/chrome/browser/ui/webui/chromeos/login/oobe_ui.cc
@@ -392,7 +392,7 @@
// Configure shared resources
AddProductLogoResources(source);
- chromeos::quick_unlock::AddFingerprintResources(source);
+ quick_unlock::AddFingerprintResources(source);
AddSyncConsentResources(source);
AddArcScreensResources(source);
AddAssistantScreensResources(source);
diff --git a/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc b/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc
index cf2df88..df598d2 100644
--- a/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/multidevice_handler.cc
@@ -535,7 +535,7 @@
bool MultideviceHandler::IsAuthTokenValid(const std::string& auth_token) {
Profile* profile = Profile::FromWebUI(web_ui());
quick_unlock::QuickUnlockStorage* quick_unlock_storage =
- chromeos::quick_unlock::QuickUnlockFactory::GetForProfile(profile);
+ quick_unlock::QuickUnlockFactory::GetForProfile(profile);
return quick_unlock_storage->GetAuthToken() &&
auth_token == quick_unlock_storage->GetAuthToken()->Identifier();
}
diff --git a/chrome/browser/ui/webui/settings/chromeos/people_section.cc b/chrome/browser/ui/webui/settings/chromeos/people_section.cc
index b0d3a36..0e24b42 100644
--- a/chrome/browser/ui/webui/settings/chromeos/people_section.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/people_section.cc
@@ -438,13 +438,11 @@
};
html_source->AddLocalizedStrings(kLocalizedStrings);
- html_source->AddBoolean("quickUnlockEnabled",
- chromeos::quick_unlock::IsPinEnabled());
+ html_source->AddBoolean("quickUnlockEnabled", quick_unlock::IsPinEnabled());
html_source->AddBoolean("quickUnlockPinAutosubmitFeatureEnabled",
chromeos::features::IsPinAutosubmitFeatureEnabled());
- html_source->AddBoolean(
- "quickUnlockDisabledByPolicy",
- chromeos::quick_unlock::IsPinDisabledByPolicy(pref_service));
+ html_source->AddBoolean("quickUnlockDisabledByPolicy",
+ quick_unlock::IsPinDisabledByPolicy(pref_service));
html_source->AddBoolean("lockScreenNotificationsEnabled",
ash::features::IsLockScreenNotificationsEnabled());
html_source->AddBoolean(
@@ -486,13 +484,13 @@
html_source->AddBoolean("fingerprintUnlockEnabled",
are_fingerprint_settings_allowed);
if (are_fingerprint_settings_allowed) {
- chromeos::quick_unlock::AddFingerprintResources(html_source);
+ quick_unlock::AddFingerprintResources(html_source);
}
int instruction_id, aria_label_id;
bool aria_label_includes_device = false;
- using FingerprintLocation = chromeos::quick_unlock::FingerprintLocation;
- switch (chromeos::quick_unlock::GetFingerprintLocation()) {
+ using FingerprintLocation = quick_unlock::FingerprintLocation;
+ switch (quick_unlock::GetFingerprintLocation()) {
case FingerprintLocation::TABLET_POWER_BUTTON:
instruction_id =
IDS_SETTINGS_ADD_FINGERPRINT_DIALOG_INSTRUCTION_LOCATE_SCANNER_POWER_BUTTON;
@@ -1069,7 +1067,7 @@
}
bool PeopleSection::AreFingerprintSettingsAllowed() {
- return chromeos::quick_unlock::IsFingerprintEnabled(profile());
+ return quick_unlock::IsFingerprintEnabled(profile());
}
void PeopleSection::UpdateRemoveFingerprintSearchTags() {
diff --git a/chrome/browser/ui/webui/settings/chromeos/privacy_section.cc b/chrome/browser/ui/webui/settings/chromeos/privacy_section.cc
index ec801f1d..f039aeb 100644
--- a/chrome/browser/ui/webui/settings/chromeos/privacy_section.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/privacy_section.cc
@@ -360,7 +360,7 @@
}
bool PrivacySection::AreFingerprintSettingsAllowed() {
- return chromeos::quick_unlock::IsFingerprintEnabled(profile());
+ return quick_unlock::IsFingerprintEnabled(profile());
}
void PrivacySection::UpdateRemoveFingerprintSearchTags() {
diff --git a/chrome/browser/ui/webui/settings/chromeos/quick_unlock_handler.cc b/chrome/browser/ui/webui/settings/chromeos/quick_unlock_handler.cc
index 049fda9..3e06874 100644
--- a/chrome/browser/ui/webui/settings/chromeos/quick_unlock_handler.cc
+++ b/chrome/browser/ui/webui/settings/chromeos/quick_unlock_handler.cc
@@ -67,9 +67,9 @@
}
void QuickUnlockHandler::UpdateQuickUnlockDisabledByPolicy() {
- FireWebUIListener("quick-unlock-disabled-by-policy-changed",
- base::Value(chromeos::quick_unlock::IsPinDisabledByPolicy(
- pref_service_)));
+ FireWebUIListener(
+ "quick-unlock-disabled-by-policy-changed",
+ base::Value(quick_unlock::IsPinDisabledByPolicy(pref_service_)));
}
} // namespace settings