| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/password_manager/password_store_factory.h" | 5 #include "chrome/browser/password_manager/password_store_factory.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 ps = new PasswordStoreWin(main_thread_runner, db_thread_runner, | 167 ps = new PasswordStoreWin(main_thread_runner, db_thread_runner, |
| 168 std::move(login_db), | 168 std::move(login_db), |
| 169 WebDataServiceFactory::GetPasswordWebDataForProfile( | 169 WebDataServiceFactory::GetPasswordWebDataForProfile( |
| 170 profile, ServiceAccessType::EXPLICIT_ACCESS)); | 170 profile, ServiceAccessType::EXPLICIT_ACCESS)); |
| 171 #elif defined(OS_MACOSX) | 171 #elif defined(OS_MACOSX) |
| 172 std::unique_ptr<crypto::AppleKeychain> keychain( | 172 std::unique_ptr<crypto::AppleKeychain> keychain( |
| 173 base::CommandLine::ForCurrentProcess()->HasSwitch( | 173 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 174 os_crypt::switches::kUseMockKeychain) | 174 os_crypt::switches::kUseMockKeychain) |
| 175 ? new crypto::MockAppleKeychain() | 175 ? new crypto::MockAppleKeychain() |
| 176 : new crypto::AppleKeychain()); | 176 : new crypto::AppleKeychain()); |
| 177 ps = new PasswordStoreProxyMac(main_thread_runner, std::move(keychain), | 177 ps = new PasswordStoreProxyMac(main_thread_runner, std::move(login_db), |
| 178 std::move(login_db), profile->GetPrefs()); | 178 profile->GetPrefs()); |
| 179 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) | 179 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) |
| 180 // For now, we use PasswordStoreDefault. We might want to make a native | 180 // For now, we use PasswordStoreDefault. We might want to make a native |
| 181 // backend for PasswordStoreX (see below) in the future though. | 181 // backend for PasswordStoreX (see below) in the future though. |
| 182 ps = new password_manager::PasswordStoreDefault( | 182 ps = new password_manager::PasswordStoreDefault( |
| 183 main_thread_runner, db_thread_runner, std::move(login_db)); | 183 main_thread_runner, db_thread_runner, std::move(login_db)); |
| 184 #elif defined(USE_X11) | 184 #elif defined(USE_X11) |
| 185 // On POSIX systems, we try to use the "native" password management system of | 185 // On POSIX systems, we try to use the "native" password management system of |
| 186 // the desktop environment currently running, allowing GNOME Keyring in XFCE. | 186 // the desktop environment currently running, allowing GNOME Keyring in XFCE. |
| 187 // (In all cases we fall back on the basic store in case of failure.) | 187 // (In all cases we fall back on the basic store in case of failure.) |
| 188 base::nix::DesktopEnvironment desktop_env = GetDesktopEnvironment(); | 188 base::nix::DesktopEnvironment desktop_env = GetDesktopEnvironment(); |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 break; | 357 break; |
| 358 case LIBSECRET: | 358 case LIBSECRET: |
| 359 usage = OTHER_LIBSECRET; | 359 usage = OTHER_LIBSECRET; |
| 360 break; | 360 break; |
| 361 } | 361 } |
| 362 } | 362 } |
| 363 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, | 363 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, |
| 364 MAX_BACKEND_USAGE_VALUE); | 364 MAX_BACKEND_USAGE_VALUE); |
| 365 } | 365 } |
| 366 #endif | 366 #endif |
| OLD | NEW |