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

Side by Side Diff: chrome/browser/password_manager/password_store_factory.cc

Issue 2931863002: Rename PasswordStoreProxyMac to PasswordStoreMac. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/password_manager/password_store_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 #include "components/password_manager/core/common/password_manager_pref_names.h" 32 #include "components/password_manager/core/common/password_manager_pref_names.h"
33 #include "components/pref_registry/pref_registry_syncable.h" 33 #include "components/pref_registry/pref_registry_syncable.h"
34 #include "components/prefs/pref_service.h" 34 #include "components/prefs/pref_service.h"
35 #include "content/public/browser/browser_thread.h" 35 #include "content/public/browser/browser_thread.h"
36 36
37 #if defined(OS_WIN) 37 #if defined(OS_WIN)
38 #include "chrome/browser/password_manager/password_manager_util_win.h" 38 #include "chrome/browser/password_manager/password_manager_util_win.h"
39 #include "chrome/browser/password_manager/password_store_win.h" 39 #include "chrome/browser/password_manager/password_store_win.h"
40 #include "components/password_manager/core/browser/webdata/password_web_data_ser vice_win.h" 40 #include "components/password_manager/core/browser/webdata/password_web_data_ser vice_win.h"
41 #elif defined(OS_MACOSX) 41 #elif defined(OS_MACOSX)
42 #include "chrome/browser/password_manager/password_store_proxy_mac.h" 42 #include "chrome/browser/password_manager/password_store_mac.h"
43 #include "crypto/apple_keychain.h" 43 #include "crypto/apple_keychain.h"
44 #include "crypto/mock_apple_keychain.h" 44 #include "crypto/mock_apple_keychain.h"
45 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) 45 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID)
46 // Don't do anything. We're going to use the default store. 46 // Don't do anything. We're going to use the default store.
47 #elif defined(USE_X11) 47 #elif defined(USE_X11)
48 #include "components/os_crypt/key_storage_util_linux.h" 48 #include "components/os_crypt/key_storage_util_linux.h"
49 #if defined(USE_GNOME_KEYRING) 49 #if defined(USE_GNOME_KEYRING)
50 #include "chrome/browser/password_manager/native_backend_gnome_x.h" 50 #include "chrome/browser/password_manager/native_backend_gnome_x.h"
51 #endif 51 #endif
52 #if defined(USE_LIBSECRET) 52 #if defined(USE_LIBSECRET)
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(login_db), 177 ps = new PasswordStoreMac(main_thread_runner, std::move(login_db),
178 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
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
OLDNEW
« no previous file with comments | « chrome/browser/BUILD.gn ('k') | chrome/browser/password_manager/password_store_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698