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

Unified Diff: components/os_crypt/libsecret_loader.h

Issue 1929573002: Changed location of LibsecretLoader (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation error Created 4 years, 8 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/libsecret_loader.h
diff --git a/components/os_crypt/libsecret_loader.h b/components/os_crypt/libsecret_loader.h
new file mode 100644
index 0000000000000000000000000000000000000000..940143ddb795c4d69e7298b3af838ef5fca23bc1
--- /dev/null
+++ b/components/os_crypt/libsecret_loader.h
@@ -0,0 +1,44 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_
+#define COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_
+
+#include <libsecret/secret.h>
+
+#include <string>
+
+#include "base/macros.h"
+
+class LibsecretLoader {
+ public:
+ static decltype(&::secret_password_store_sync) secret_password_store_sync;
+ static decltype(&::secret_service_search_sync) secret_service_search_sync;
+ static decltype(&::secret_password_clear_sync) secret_password_clear_sync;
+ static decltype(&::secret_item_get_secret) secret_item_get_secret;
+ static decltype(&::secret_value_get_text) secret_value_get_text;
+ static decltype(&::secret_item_get_attributes) secret_item_get_attributes;
+ static decltype(&::secret_item_load_secret_sync) secret_item_load_secret_sync;
+ static decltype(&::secret_value_unref) secret_value_unref;
+
+ protected:
+ LibsecretLoader() = default;
+
+ static bool LoadLibsecret();
+ static bool LibsecretIsAvailable();
+
+ static bool libsecret_loaded;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(LibsecretLoader);
vabr (Chromium) 2016/04/28 12:44:25 nit: This still needs to be at the very end of the
cfroussios 2016/04/28 14:33:43 Done.
+
+ struct FunctionInfo {
+ const char* name;
+ void** pointer;
+ };
+
+ static const FunctionInfo functions[];
+};
+
+#endif // COMPONENTS_OS_CRYPT_LIBSECRET_LOADER_H_

Powered by Google App Engine
This is Rietveld 408576698