OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_OS_CRYPT_KEY_STORAGE_UTIL_LINUX_H_ |
| 6 #define COMPONENTS_OS_CRYPT_KEY_STORAGE_UTIL_LINUX_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/nix/xdg_util.h" |
| 11 |
| 12 namespace os_crypt { |
| 13 |
| 14 // The supported Linux backends for storing passwords. |
| 15 enum class SelectedLinuxBackend { |
| 16 DEFER, // No selection |
| 17 BASIC_TEXT, |
| 18 GNOME_ANY, // GNOME_KEYRING or GNOME_LIBSECRET, whichever is available. |
| 19 GNOME_KEYRING, |
| 20 GNOME_LIBSECRET, |
| 21 KWALLET, |
| 22 KWALLET5, |
| 23 }; |
| 24 |
| 25 // Decide which backend to target. |type| is checked first. If it does not |
| 26 // match a supported backend, |desktop_env| will be used to decide. |
| 27 // TODO(crbug/571003): This is exposed as a utility only for password manager to |
| 28 // use. It should be merged into key_storage_linux, once no longer needed in |
| 29 // password manager. |
| 30 SelectedLinuxBackend SelectBackend(const std::string& type, |
| 31 base::nix::DesktopEnvironment desktop_env); |
| 32 |
| 33 } // namespace os_crypt |
| 34 |
| 35 #endif // COMPONENTS_OS_CRYPT_KEY_STORAGE_UTIL_LINUX_H_ |
OLD | NEW |