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

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

Issue 1226303003: Start the migration of passwords from the Keychain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix the test Created 5 years, 5 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.cc » ('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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 PasswordStoreProxyMac(main_thread_runner, keychain.Pass(), 273 ps = new PasswordStoreProxyMac(main_thread_runner, keychain.Pass(),
274 login_db.Pass()); 274 login_db.Pass(), profile->GetPrefs());
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.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698