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

Side by Side Diff: chrome/browser/certificate_manager_model.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, 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/certificate_manager_model.h" 5 #include "chrome/browser/certificate_manager_model.h"
6 6
7 #include <utility>
8
7 #include "base/bind.h" 9 #include "base/bind.h"
8 #include "base/i18n/time_formatting.h" 10 #include "base/i18n/time_formatting.h"
9 #include "base/logging.h" 11 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 12 #include "base/strings/utf_string_conversions.h"
11 #include "build/build_config.h" 13 #include "build/build_config.h"
12 #include "chrome/browser/net/nss_context.h" 14 #include "chrome/browser/net/nss_context.h"
13 #include "chrome/browser/ui/crypto_module_password_dialog_nss.h" 15 #include "chrome/browser/ui/crypto_module_password_dialog_nss.h"
14 #include "chrome/common/net/x509_certificate_model.h" 16 #include "chrome/common/net/x509_certificate_model.h"
15 #include "chrome/grit/generated_resources.h" 17 #include "chrome/grit/generated_resources.h"
16 #include "content/public/browser/browser_context.h" 18 #include "content/public/browser/browser_context.h"
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 void CertificateManagerModel::DidGetCertDBOnUIThread( 220 void CertificateManagerModel::DidGetCertDBOnUIThread(
219 net::NSSCertDatabase* cert_db, 221 net::NSSCertDatabase* cert_db,
220 bool is_user_db_available, 222 bool is_user_db_available,
221 bool is_tpm_available, 223 bool is_tpm_available,
222 CertificateManagerModel::Observer* observer, 224 CertificateManagerModel::Observer* observer,
223 const CreationCallback& callback) { 225 const CreationCallback& callback) {
224 DCHECK_CURRENTLY_ON(BrowserThread::UI); 226 DCHECK_CURRENTLY_ON(BrowserThread::UI);
225 227
226 scoped_ptr<CertificateManagerModel> model(new CertificateManagerModel( 228 scoped_ptr<CertificateManagerModel> model(new CertificateManagerModel(
227 cert_db, is_user_db_available, is_tpm_available, observer)); 229 cert_db, is_user_db_available, is_tpm_available, observer));
228 callback.Run(model.Pass()); 230 callback.Run(std::move(model));
229 } 231 }
230 232
231 // static 233 // static
232 void CertificateManagerModel::DidGetCertDBOnIOThread( 234 void CertificateManagerModel::DidGetCertDBOnIOThread(
233 CertificateManagerModel::Observer* observer, 235 CertificateManagerModel::Observer* observer,
234 const CreationCallback& callback, 236 const CreationCallback& callback,
235 net::NSSCertDatabase* cert_db) { 237 net::NSSCertDatabase* cert_db) {
236 DCHECK_CURRENTLY_ON(BrowserThread::IO); 238 DCHECK_CURRENTLY_ON(BrowserThread::IO);
237 239
238 bool is_user_db_available = cert_db->GetPublicSlot(); 240 bool is_user_db_available = cert_db->GetPublicSlot();
(...skipping 19 matching lines...) Expand all
258 const CreationCallback& callback) { 260 const CreationCallback& callback) {
259 DCHECK_CURRENTLY_ON(BrowserThread::IO); 261 DCHECK_CURRENTLY_ON(BrowserThread::IO);
260 net::NSSCertDatabase* cert_db = GetNSSCertDatabaseForResourceContext( 262 net::NSSCertDatabase* cert_db = GetNSSCertDatabaseForResourceContext(
261 context, 263 context,
262 base::Bind(&CertificateManagerModel::DidGetCertDBOnIOThread, 264 base::Bind(&CertificateManagerModel::DidGetCertDBOnIOThread,
263 observer, 265 observer,
264 callback)); 266 callback));
265 if (cert_db) 267 if (cert_db)
266 DidGetCertDBOnIOThread(observer, callback, cert_db); 268 DidGetCertDBOnIOThread(observer, callback, cert_db);
267 } 269 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698