| Index: components/os_crypt/key_storage_libsecret.cc
|
| diff --git a/components/os_crypt/key_storage_libsecret.cc b/components/os_crypt/key_storage_libsecret.cc
|
| index 9c27ffc443cad053a0bed4304a12265d2839c256..2250775de6dd44b320501dddd349dd8a09d4b6ef 100644
|
| --- a/components/os_crypt/key_storage_libsecret.cc
|
| +++ b/components/os_crypt/key_storage_libsecret.cc
|
| @@ -11,12 +11,6 @@
|
|
|
| namespace {
|
|
|
| -#if defined(OFFICIAL_BUILD)
|
| -const char kKeyStorageEntryName[] = "Chrome Safe Storage";
|
| -#else
|
| -const char kKeyStorageEntryName[] = "Chromium Safe Storage";
|
| -#endif
|
| -
|
| const SecretSchema kKeystoreSchema = {
|
| "chrome_libsecret_os_crypt_password",
|
| SECRET_SCHEMA_NONE,
|
| @@ -24,12 +18,14 @@ const SecretSchema kKeystoreSchema = {
|
| {nullptr, SECRET_SCHEMA_ATTRIBUTE_STRING},
|
| }};
|
|
|
| -std::string AddRandomPasswordInLibsecret() {
|
| +} // namespace
|
| +
|
| +std::string KeyStorageLibsecret::AddRandomPasswordInLibsecret() {
|
| std::string password;
|
| base::Base64Encode(base::RandBytesAsString(16), &password);
|
| GError* error = nullptr;
|
| LibsecretLoader::secret_password_store_sync(
|
| - &kKeystoreSchema, nullptr, kKeyStorageEntryName, password.c_str(),
|
| + &kKeystoreSchema, nullptr, KeyStorageLinux::kKey, password.c_str(),
|
| nullptr, &error, nullptr);
|
|
|
| if (error) {
|
| @@ -39,8 +35,6 @@ std::string AddRandomPasswordInLibsecret() {
|
| return password;
|
| }
|
|
|
| -} // namespace
|
| -
|
| std::string KeyStorageLibsecret::GetKey() {
|
| GError* error = nullptr;
|
| LibsecretAttributesBuilder attrs;
|
|
|