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

Unified Diff: components/os_crypt/libsecret_util_linux.cc

Issue 2441653002: Always unlock all libsecret items in Password Manager and OSCrypt (Closed)
Patch Set: format Created 4 years, 2 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
« no previous file with comments | « components/os_crypt/libsecret_util_linux.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/os_crypt/libsecret_util_linux.cc
diff --git a/components/os_crypt/libsecret_util_linux.cc b/components/os_crypt/libsecret_util_linux.cc
index 0e01aef05b568286ab28640569543acfbbaff295..358bc1b57afffb2792d81ba15927d8867490939e 100644
--- a/components/os_crypt/libsecret_util_linux.cc
+++ b/components/os_crypt/libsecret_util_linux.cc
@@ -26,8 +26,6 @@ decltype(
decltype(&::secret_item_load_secret_sync)
LibsecretLoader::secret_item_load_secret_sync;
decltype(&::secret_value_unref) LibsecretLoader::secret_value_unref;
-decltype(
- &::secret_service_lookup_sync) LibsecretLoader::secret_service_lookup_sync;
bool LibsecretLoader::libsecret_loaded_ = false;
@@ -42,8 +40,6 @@ const LibsecretLoader::FunctionInfo LibsecretLoader::kFunctions[] = {
reinterpret_cast<void**>(&secret_password_clear_sync)},
{"secret_password_store_sync",
reinterpret_cast<void**>(&secret_password_store_sync)},
- {"secret_service_lookup_sync",
- reinterpret_cast<void**>(&secret_service_lookup_sync)},
{"secret_service_search_sync",
reinterpret_cast<void**>(&secret_service_search_sync)},
{"secret_value_get_text", reinterpret_cast<void**>(&secret_value_get_text)},
@@ -102,11 +98,12 @@ bool LibsecretLoader::LibsecretIsAvailable() {
{nullptr, SECRET_SCHEMA_ATTRIBUTE_STRING}}};
GError* error = nullptr;
- GList* found =
- secret_service_search_sync(nullptr, // default secret service
- &kDummySchema, attrs.Get(), SECRET_SEARCH_ALL,
- nullptr, // no cancellable ojbect
- &error);
+ GList* found = secret_service_search_sync(
+ nullptr, // default secret service
+ &kDummySchema, attrs.Get(),
+ static_cast<SecretSearchFlags>(SECRET_SEARCH_ALL | SECRET_SEARCH_UNLOCK),
+ nullptr, // no cancellable ojbect
+ &error);
bool success = (error == nullptr);
if (error)
g_error_free(error);
« no previous file with comments | « components/os_crypt/libsecret_util_linux.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698