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

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

Issue 1579863003: Convert Pass()→std::move() for Mac build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
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 <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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 login_db.Pass(),
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, keychain.Pass(), 174 ps = new PasswordStoreProxyMac(main_thread_runner, std::move(keychain),
175 login_db.Pass(), profile->GetPrefs()); 175 std::move(login_db), profile->GetPrefs());
176 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID) 176 #elif defined(OS_CHROMEOS) || defined(OS_ANDROID)
177 // For now, we use PasswordStoreDefault. We might want to make a native 177 // For now, we use PasswordStoreDefault. We might want to make a native
178 // backend for PasswordStoreX (see below) in the future though. 178 // backend for PasswordStoreX (see below) in the future though.
179 ps = new password_manager::PasswordStoreDefault( 179 ps = new password_manager::PasswordStoreDefault(
180 main_thread_runner, db_thread_runner, std::move(login_db)); 180 main_thread_runner, db_thread_runner, std::move(login_db));
181 #elif defined(USE_X11) 181 #elif defined(USE_X11)
182 // On POSIX systems, we try to use the "native" password management system of 182 // On POSIX systems, we try to use the "native" password management system of
183 // the desktop environment currently running, allowing GNOME Keyring in XFCE. 183 // the desktop environment currently running, allowing GNOME Keyring in XFCE.
184 // (In all cases we fall back on the basic store in case of failure.) 184 // (In all cases we fall back on the basic store in case of failure.)
185 base::nix::DesktopEnvironment desktop_env = GetDesktopEnvironment(); 185 base::nix::DesktopEnvironment desktop_env = GetDesktopEnvironment();
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 break; 351 break;
352 case LIBSECRET: 352 case LIBSECRET:
353 usage = OTHER_LIBSECRET; 353 usage = OTHER_LIBSECRET;
354 break; 354 break;
355 } 355 }
356 } 356 }
357 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, 357 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage,
358 MAX_BACKEND_USAGE_VALUE); 358 MAX_BACKEND_USAGE_VALUE);
359 } 359 }
360 #endif 360 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698