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

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

Issue 1200603003: Integrate PasswordStoreProxyMac instead of PasswordStoreMac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 5 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 | « no previous file | 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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/environment.h" 8 #include "base/environment.h"
9 #include "base/metrics/histogram_macros.h" 9 #include "base/metrics/histogram_macros.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 17 matching lines...) Expand all
28 #include "components/password_manager/core/browser/password_store.h" 28 #include "components/password_manager/core/browser/password_store.h"
29 #include "components/password_manager/core/browser/password_store_default.h" 29 #include "components/password_manager/core/browser/password_store_default.h"
30 #include "components/password_manager/core/common/password_manager_pref_names.h" 30 #include "components/password_manager/core/common/password_manager_pref_names.h"
31 #include "components/pref_registry/pref_registry_syncable.h" 31 #include "components/pref_registry/pref_registry_syncable.h"
32 #include "content/public/browser/browser_thread.h" 32 #include "content/public/browser/browser_thread.h"
33 33
34 #if defined(OS_WIN) 34 #if defined(OS_WIN)
35 #include "chrome/browser/password_manager/password_store_win.h" 35 #include "chrome/browser/password_manager/password_store_win.h"
36 #include "components/password_manager/core/browser/webdata/password_web_data_ser vice_win.h" 36 #include "components/password_manager/core/browser/webdata/password_web_data_ser vice_win.h"
37 #elif defined(OS_MACOSX) 37 #elif defined(OS_MACOSX)
38 #include "chrome/browser/password_manager/password_store_mac.h" 38 #include "chrome/browser/password_manager/password_store_proxy_mac.h"
39 #include "crypto/apple_keychain.h" 39 #include "crypto/apple_keychain.h"
40 #include "crypto/mock_apple_keychain.h" 40 #include "crypto/mock_apple_keychain.h"
41 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) 41 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID)
42 // Don't do anything. We're going to use the default store. 42 // Don't do anything. We're going to use the default store.
43 #elif defined(USE_X11) 43 #elif defined(USE_X11)
44 #include "base/nix/xdg_util.h" 44 #include "base/nix/xdg_util.h"
45 #if defined(USE_GNOME_KEYRING) 45 #if defined(USE_GNOME_KEYRING)
46 #include "chrome/browser/password_manager/native_backend_gnome_x.h" 46 #include "chrome/browser/password_manager/native_backend_gnome_x.h"
47 #endif 47 #endif
48 #if defined(USE_LIBSECRET) 48 #if defined(USE_LIBSECRET)
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 ps = new PasswordStoreWin(main_thread_runner, db_thread_runner, 263 ps = new PasswordStoreWin(main_thread_runner, db_thread_runner,
264 login_db.Pass(), 264 login_db.Pass(),
265 WebDataServiceFactory::GetPasswordWebDataForProfile( 265 WebDataServiceFactory::GetPasswordWebDataForProfile(
266 profile, ServiceAccessType::EXPLICIT_ACCESS)); 266 profile, ServiceAccessType::EXPLICIT_ACCESS));
267 #elif defined(OS_MACOSX) 267 #elif defined(OS_MACOSX)
268 scoped_ptr<crypto::AppleKeychain> keychain( 268 scoped_ptr<crypto::AppleKeychain> keychain(
269 base::CommandLine::ForCurrentProcess()->HasSwitch( 269 base::CommandLine::ForCurrentProcess()->HasSwitch(
270 os_crypt::switches::kUseMockKeychain) 270 os_crypt::switches::kUseMockKeychain)
271 ? new crypto::MockAppleKeychain() 271 ? new crypto::MockAppleKeychain()
272 : new crypto::AppleKeychain()); 272 : new crypto::AppleKeychain());
273 ps = new PasswordStoreMac(main_thread_runner, db_thread_runner, 273 ps = new PasswordStoreProxyMac(main_thread_runner, keychain.Pass(),
274 keychain.Pass(), login_db.Pass()); 274 login_db.Pass());
275 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) 275 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID)
276 // For now, we use PasswordStoreDefault. We might want to make a native 276 // For now, we use PasswordStoreDefault. We might want to make a native
277 // backend for PasswordStoreX (see below) in the future though. 277 // backend for PasswordStoreX (see below) in the future though.
278 ps = new password_manager::PasswordStoreDefault( 278 ps = new password_manager::PasswordStoreDefault(
279 main_thread_runner, db_thread_runner, login_db.Pass()); 279 main_thread_runner, db_thread_runner, login_db.Pass());
280 #elif defined(USE_X11) 280 #elif defined(USE_X11)
281 // On POSIX systems, we try to use the "native" password management system of 281 // On POSIX systems, we try to use the "native" password management system of
282 // the desktop environment currently running, allowing GNOME Keyring in XFCE. 282 // the desktop environment currently running, allowing GNOME Keyring in XFCE.
283 // (In all cases we fall back on the basic store in case of failure.) 283 // (In all cases we fall back on the basic store in case of failure.)
284 base::nix::DesktopEnvironment desktop_env = GetDesktopEnvironment(); 284 base::nix::DesktopEnvironment desktop_env = GetDesktopEnvironment();
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 break; 448 break;
449 case LIBSECRET: 449 case LIBSECRET:
450 usage = OTHER_LIBSECRET; 450 usage = OTHER_LIBSECRET;
451 break; 451 break;
452 } 452 }
453 } 453 }
454 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, 454 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage,
455 MAX_BACKEND_USAGE_VALUE); 455 MAX_BACKEND_USAGE_VALUE);
456 } 456 }
457 #endif 457 #endif
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/password_manager/password_store_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698