| 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" |
| 11 #include "base/environment.h" | 11 #include "base/environment.h" |
| 12 #include "base/metrics/histogram_macros.h" | 12 #include "base/metrics/histogram_macros.h" |
| 13 #include "base/rand_util.h" | 13 #include "base/rand_util.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" | 14 #include "base/threading/thread_task_runner_handle.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/browser/profiles/incognito_helpers.h" | 16 #include "chrome/browser/profiles/incognito_helpers.h" |
| 17 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 18 #include "chrome/browser/sync/glue/sync_start_util.h" | 18 #include "chrome/browser/sync/glue/sync_start_util.h" |
| 19 #include "chrome/browser/sync/profile_sync_service_factory.h" | 19 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 20 #include "chrome/browser/web_data_service_factory.h" | 20 #include "chrome/browser/web_data_service_factory.h" |
| 21 #include "chrome/common/chrome_switches.h" | 21 #include "chrome/common/chrome_switches.h" |
| 22 #include "components/browser_sync/profile_sync_service.h" | 22 #include "components/browser_sync/profile_sync_service.h" |
| 23 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 23 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| 24 #include "components/os_crypt/key_storage_util_linux.h" | |
| 25 #include "components/os_crypt/os_crypt_switches.h" | 24 #include "components/os_crypt/os_crypt_switches.h" |
| 26 #include "components/password_manager/core/browser/login_database.h" | 25 #include "components/password_manager/core/browser/login_database.h" |
| 27 #include "components/password_manager/core/browser/password_store.h" | 26 #include "components/password_manager/core/browser/password_store.h" |
| 28 #include "components/password_manager/core/browser/password_store_default.h" | 27 #include "components/password_manager/core/browser/password_store_default.h" |
| 29 #include "components/password_manager/core/browser/password_store_factory_util.h
" | 28 #include "components/password_manager/core/browser/password_store_factory_util.h
" |
| 30 #include "components/password_manager/core/common/password_manager_pref_names.h" | 29 #include "components/password_manager/core/common/password_manager_pref_names.h" |
| 31 #include "components/pref_registry/pref_registry_syncable.h" | 30 #include "components/pref_registry/pref_registry_syncable.h" |
| 32 #include "components/prefs/pref_service.h" | 31 #include "components/prefs/pref_service.h" |
| 33 #include "content/public/browser/browser_thread.h" | 32 #include "content/public/browser/browser_thread.h" |
| 34 | 33 |
| 35 #if defined(OS_WIN) | 34 #if defined(OS_WIN) |
| 36 #include "chrome/browser/password_manager/password_manager_util_win.h" | 35 #include "chrome/browser/password_manager/password_manager_util_win.h" |
| 37 #include "chrome/browser/password_manager/password_store_win.h" | 36 #include "chrome/browser/password_manager/password_store_win.h" |
| 38 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" | 37 #include "components/password_manager/core/browser/webdata/password_web_data_ser
vice_win.h" |
| 39 #elif defined(OS_MACOSX) | 38 #elif defined(OS_MACOSX) |
| 40 #include "chrome/browser/password_manager/password_store_proxy_mac.h" | 39 #include "chrome/browser/password_manager/password_store_proxy_mac.h" |
| 41 #include "crypto/apple_keychain.h" | 40 #include "crypto/apple_keychain.h" |
| 42 #include "crypto/mock_apple_keychain.h" | 41 #include "crypto/mock_apple_keychain.h" |
| 43 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) | 42 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) |
| 44 // Don't do anything. We're going to use the default store. | 43 // Don't do anything. We're going to use the default store. |
| 45 #elif defined(USE_X11) | 44 #elif defined(USE_X11) |
| 46 #include "base/nix/xdg_util.h" | 45 #include "components/os_crypt/key_storage_util_linux.h" |
| 47 #if defined(USE_GNOME_KEYRING) | 46 #if defined(USE_GNOME_KEYRING) |
| 48 #include "chrome/browser/password_manager/native_backend_gnome_x.h" | 47 #include "chrome/browser/password_manager/native_backend_gnome_x.h" |
| 49 #endif | 48 #endif |
| 50 #if defined(USE_LIBSECRET) | 49 #if defined(USE_LIBSECRET) |
| 51 #include "chrome/browser/password_manager/native_backend_libsecret.h" | 50 #include "chrome/browser/password_manager/native_backend_libsecret.h" |
| 52 #endif | 51 #endif |
| 53 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" | 52 #include "chrome/browser/password_manager/native_backend_kwallet_x.h" |
| 54 #include "chrome/browser/password_manager/password_store_x.h" | 53 #include "chrome/browser/password_manager/password_store_x.h" |
| 55 #endif | 54 #endif |
| 56 | 55 |
| (...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 break; | 349 break; |
| 351 case LIBSECRET: | 350 case LIBSECRET: |
| 352 usage = OTHER_LIBSECRET; | 351 usage = OTHER_LIBSECRET; |
| 353 break; | 352 break; |
| 354 } | 353 } |
| 355 } | 354 } |
| 356 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, | 355 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, |
| 357 MAX_BACKEND_USAGE_VALUE); | 356 MAX_BACKEND_USAGE_VALUE); |
| 358 } | 357 } |
| 359 #endif | 358 #endif |
| OLD | NEW |