feat: expose safestorage backend information on linux (#38873)

* feat: expose safestorage backend information on linux

* Remove gnome-keyring

Refs 4609704
This commit is contained in:
Robo 2023-07-13 18:14:33 +09:00 committed by GitHub
parent dc671804da
commit 34e7c3696a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 127 additions and 39 deletions

View file

@ -305,6 +305,36 @@ const std::string& BrowserProcessImpl::GetSystemLocale() const {
return system_locale_;
}
#if BUILDFLAG(IS_LINUX)
void BrowserProcessImpl::SetLinuxStorageBackend(
os_crypt::SelectedLinuxBackend selected_backend) {
switch (selected_backend) {
case os_crypt::SelectedLinuxBackend::BASIC_TEXT:
selected_linux_storage_backend_ = "basic_text";
break;
case os_crypt::SelectedLinuxBackend::GNOME_LIBSECRET:
selected_linux_storage_backend_ = "gnome_libsecret";
break;
case os_crypt::SelectedLinuxBackend::KWALLET:
selected_linux_storage_backend_ = "kwallet";
break;
case os_crypt::SelectedLinuxBackend::KWALLET5:
selected_linux_storage_backend_ = "kwallet5";
break;
case os_crypt::SelectedLinuxBackend::KWALLET6:
selected_linux_storage_backend_ = "kwallet6";
break;
case os_crypt::SelectedLinuxBackend::DEFER:
NOTREACHED();
break;
}
}
const std::string& BrowserProcessImpl::GetLinuxStorageBackend() const {
return selected_linux_storage_backend_;
}
#endif // BUILDFLAG(IS_LINUX)
void BrowserProcessImpl::SetApplicationLocale(const std::string& locale) {
locale_ = locale;
}