| OLD | NEW |
| 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 #include "components/os_crypt/key_storage_keyring.h" | 5 #include "components/os_crypt/key_storage_keyring.h" |
| 6 | 6 |
| 7 #include <gnome-keyring.h> | |
| 8 | |
| 9 #include "base/base64.h" | 7 #include "base/base64.h" |
| 10 #include "base/bind.h" | 8 #include "base/bind.h" |
| 11 #include "base/rand_util.h" | 9 #include "base/rand_util.h" |
| 12 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| 13 #include "base/strings/string_number_conversions.h" | 11 #include "base/strings/string_number_conversions.h" |
| 14 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
| 15 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 16 #include "components/os_crypt/keyring_util_linux.h" | 14 #include "components/os_crypt/keyring_util_linux.h" |
| 17 | 15 |
| 18 namespace { | 16 namespace { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 GnomeKeyringLoader::gnome_keyring_store_password_sync_ptr( | 89 GnomeKeyringLoader::gnome_keyring_store_password_sync_ptr( |
| 92 &kSchema, nullptr /* default keyring */, KeyStorageLinux::kKey, | 90 &kSchema, nullptr /* default keyring */, KeyStorageLinux::kKey, |
| 93 password.c_str(), "application", kApplicationName, nullptr); | 91 password.c_str(), "application", kApplicationName, nullptr); |
| 94 if (result != GNOME_KEYRING_RESULT_OK) { | 92 if (result != GNOME_KEYRING_RESULT_OK) { |
| 95 VLOG(1) << "Failed to store generated password to gnome-keyring"; | 93 VLOG(1) << "Failed to store generated password to gnome-keyring"; |
| 96 return std::string(); | 94 return std::string(); |
| 97 } | 95 } |
| 98 | 96 |
| 99 return password; | 97 return password; |
| 100 } | 98 } |
| OLD | NEW |