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

Side by Side Diff: components/os_crypt/libsecret_util_linux.h

Issue 2465083002: Add a dummy entry with libsecret when initializing OSCrypt. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_OS_CRYPT_LIBSECRET_UTIL_LINUX_H_ 5 #ifndef COMPONENTS_OS_CRYPT_LIBSECRET_UTIL_LINUX_H_
6 #define COMPONENTS_OS_CRYPT_LIBSECRET_UTIL_LINUX_H_ 6 #define COMPONENTS_OS_CRYPT_LIBSECRET_UTIL_LINUX_H_
7 7
8 #include <libsecret/secret.h> 8 #include <libsecret/secret.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 12 matching lines...) Expand all
23 static decltype(&::secret_service_search_sync) secret_service_search_sync; 23 static decltype(&::secret_service_search_sync) secret_service_search_sync;
24 static decltype(&::secret_value_get_text) secret_value_get_text; 24 static decltype(&::secret_value_get_text) secret_value_get_text;
25 static decltype(&::secret_value_unref) secret_value_unref; 25 static decltype(&::secret_value_unref) secret_value_unref;
26 26
27 // Loads the libsecret library and checks that it responds to queries. 27 // Loads the libsecret library and checks that it responds to queries.
28 // Returns false if either step fails. 28 // Returns false if either step fails.
29 // Repeated calls check the responsiveness every time, but do not load the 29 // Repeated calls check the responsiveness every time, but do not load the
30 // the library again if already successful. 30 // the library again if already successful.
31 static bool EnsureLibsecretLoaded(); 31 static bool EnsureLibsecretLoaded();
32 32
33 // Ensure that the default keyring is accessible. This won't prevent the user
34 // from locking their keyring while Chrome is running.
35 static void EnsureKeyringUnlocked();
36
33 protected: 37 protected:
34 static bool libsecret_loaded_; 38 static bool libsecret_loaded_;
35 39
36 private: 40 private:
37 struct FunctionInfo { 41 struct FunctionInfo {
38 const char* name; 42 const char* name;
39 void** pointer; 43 void** pointer;
40 }; 44 };
41 45
42 static const FunctionInfo kFunctions[]; 46 static const FunctionInfo kFunctions[];
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 // the implementation details of containers. External objects keep references 78 // the implementation details of containers. External objects keep references
75 // to the objects stored in this container. Using a vector here will fail the 79 // to the objects stored in this container. Using a vector here will fail the
76 // ASan tests, because it may move the objects and break the references. 80 // ASan tests, because it may move the objects and break the references.
77 std::list<std::string> name_values_; 81 std::list<std::string> name_values_;
78 GHashTable* attrs_; 82 GHashTable* attrs_;
79 83
80 DISALLOW_COPY_AND_ASSIGN(LibsecretAttributesBuilder); 84 DISALLOW_COPY_AND_ASSIGN(LibsecretAttributesBuilder);
81 }; 85 };
82 86
83 #endif // COMPONENTS_OS_CRYPT_LIBSECRET_UTIL_LINUX_H_ 87 #endif // COMPONENTS_OS_CRYPT_LIBSECRET_UTIL_LINUX_H_
OLDNEW
« no previous file with comments | « components/os_crypt/key_storage_libsecret_unittest.cc ('k') | components/os_crypt/libsecret_util_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698