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

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

Issue 1551503002: Convert Pass()→std::move() in //chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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>
8
7 #include "base/command_line.h" 9 #include "base/command_line.h"
8 #include "base/environment.h" 10 #include "base/environment.h"
9 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram_macros.h" 12 #include "base/metrics/histogram_macros.h"
11 #include "base/prefs/pref_service.h" 13 #include "base/prefs/pref_service.h"
12 #include "base/rand_util.h" 14 #include "base/rand_util.h"
13 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
14 #include "build/build_config.h" 16 #include "build/build_config.h"
15 #include "chrome/browser/profiles/incognito_helpers.h" 17 #include "chrome/browser/profiles/incognito_helpers.h"
16 #include "chrome/browser/profiles/profile.h" 18 #include "chrome/browser/profiles/profile.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 #endif // defined(USE_GNOME_KEYRING) 245 #endif // defined(USE_GNOME_KEYRING)
244 } 246 }
245 } 247 }
246 248
247 if (!backend.get()) { 249 if (!backend.get()) {
248 LOG(WARNING) << "Using basic (unencrypted) store for password storage. " 250 LOG(WARNING) << "Using basic (unencrypted) store for password storage. "
249 "See http://code.google.com/p/chromium/wiki/LinuxPasswordStorage for " 251 "See http://code.google.com/p/chromium/wiki/LinuxPasswordStorage for "
250 "more information about password storage options."; 252 "more information about password storage options.";
251 } 253 }
252 254
253 ps = new PasswordStoreX(main_thread_runner, db_thread_runner, login_db.Pass(), 255 ps = new PasswordStoreX(main_thread_runner, db_thread_runner,
254 backend.release()); 256 std::move(login_db), backend.release());
255 RecordBackendStatistics(desktop_env, store_type, used_backend); 257 RecordBackendStatistics(desktop_env, store_type, used_backend);
256 #elif defined(USE_OZONE) 258 #elif defined(USE_OZONE)
257 ps = new password_manager::PasswordStoreDefault( 259 ps = new password_manager::PasswordStoreDefault(
258 main_thread_runner, db_thread_runner, login_db.Pass()); 260 main_thread_runner, db_thread_runner, login_db.Pass());
259 #else 261 #else
260 NOTIMPLEMENTED(); 262 NOTIMPLEMENTED();
261 #endif 263 #endif
262 DCHECK(ps); 264 DCHECK(ps);
263 if (!ps->Init( 265 if (!ps->Init(
264 sync_start_util::GetFlareForSyncableService(profile->GetPath()))) { 266 sync_start_util::GetFlareForSyncableService(profile->GetPath()))) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 break; 351 break;
350 case LIBSECRET: 352 case LIBSECRET:
351 usage = OTHER_LIBSECRET; 353 usage = OTHER_LIBSECRET;
352 break; 354 break;
353 } 355 }
354 } 356 }
355 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage, 357 UMA_HISTOGRAM_ENUMERATION("PasswordManager.LinuxBackendStatistics", usage,
356 MAX_BACKEND_USAGE_VALUE); 358 MAX_BACKEND_USAGE_VALUE);
357 } 359 }
358 #endif 360 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698