| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 | 155 |
| 156 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner( | 156 scoped_refptr<base::SingleThreadTaskRunner> main_thread_runner( |
| 157 base::ThreadTaskRunnerHandle::Get()); | 157 base::ThreadTaskRunnerHandle::Get()); |
| 158 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner( | 158 scoped_refptr<base::SingleThreadTaskRunner> db_thread_runner( |
| 159 content::BrowserThread::GetMessageLoopProxyForThread( | 159 content::BrowserThread::GetMessageLoopProxyForThread( |
| 160 content::BrowserThread::DB)); | 160 content::BrowserThread::DB)); |
| 161 | 161 |
| 162 scoped_refptr<PasswordStore> ps; | 162 scoped_refptr<PasswordStore> ps; |
| 163 #if defined(OS_WIN) | 163 #if defined(OS_WIN) |
| 164 ps = new PasswordStoreWin(main_thread_runner, db_thread_runner, | 164 ps = new PasswordStoreWin(main_thread_runner, db_thread_runner, |
| 165 login_db.Pass(), | 165 std::move(login_db), |
| 166 WebDataServiceFactory::GetPasswordWebDataForProfile( | 166 WebDataServiceFactory::GetPasswordWebDataForProfile( |
| 167 profile, ServiceAccessType::EXPLICIT_ACCESS)); | 167 profile, ServiceAccessType::EXPLICIT_ACCESS)); |
| 168 #elif defined(OS_MACOSX) | 168 #elif defined(OS_MACOSX) |
| 169 scoped_ptr<crypto::AppleKeychain> keychain( | 169 scoped_ptr<crypto::AppleKeychain> keychain( |
| 170 base::CommandLine::ForCurrentProcess()->HasSwitch( | 170 base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 171 os_crypt::switches::kUseMockKeychain) | 171 os_crypt::switches::kUseMockKeychain) |
| 172 ? new crypto::MockAppleKeychain() | 172 ? new crypto::MockAppleKeychain() |
| 173 : new crypto::AppleKeychain()); | 173 : new crypto::AppleKeychain()); |
| 174 ps = new PasswordStoreProxyMac(main_thread_runner, std::move(keychain), | 174 ps = new PasswordStoreProxyMac(main_thread_runner, std::move(keychain), |
| 175 std::move(login_db), profile->GetPrefs()); | 175 std::move(login_db), profile->GetPrefs()); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 break; | 352 break; |
| 353 case LIBSECRET: | 353 case LIBSECRET: |
| 354 usage = OTHER_LIBSECRET; | 354 usage = OTHER_LIBSECRET; |
| 355 break; | 355 break; |
| 356 } | 356 } |
| 357 } | 357 } |
| 358 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, | 358 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, |
| 359 MAX_BACKEND_USAGE_VALUE); | 359 MAX_BACKEND_USAGE_VALUE); |
| 360 } | 360 } |
| 361 #endif | 361 #endif |
| OLD | NEW |