Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Unified Diff: components/os_crypt/key_storage_libsecret.cc

Issue 2150543002: OSCrypt supports encryption with KWallet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;

Powered by Google App Engine
This is Rietveld 408576698