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

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

Issue 1551033002: Convert Pass()→std::move() in //chrome (Android edition) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable RVO by making types match 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
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, keychain.Pass(),
175 login_db.Pass(), profile->GetPrefs()); 175 login_db.Pass(), 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, login_db.Pass()); 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();
186 base::nix::DesktopEnvironment used_desktop_env; 186 base::nix::DesktopEnvironment used_desktop_env;
187 std::string store_type = 187 std::string store_type =
188 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII( 188 base::CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
189 switches::kPasswordStore); 189 switches::kPasswordStore);
190 LinuxBackendUsed used_backend = PLAINTEXT; 190 LinuxBackendUsed used_backend = PLAINTEXT;
(...skipping 160 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