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: chromeos/cert_loader.cc

Issue 2854953005: Use constexpr TaskTraits constructor in chromeos. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "chromeos/cert_loader.h" 5 #include "chromeos/cert_loader.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 } 200 }
201 201
202 void CertLoader::CertificatesLoaded( 202 void CertLoader::CertificatesLoaded(
203 std::unique_ptr<net::CertificateList> all_certs) { 203 std::unique_ptr<net::CertificateList> all_certs) {
204 DCHECK(thread_checker_.CalledOnValidThread()); 204 DCHECK(thread_checker_.CalledOnValidThread());
205 VLOG(1) << "CertificatesLoaded: " << all_certs->size(); 205 VLOG(1) << "CertificatesLoaded: " << all_certs->size();
206 206
207 crypto::ScopedPK11Slot system_slot = database_->GetSystemSlot(); 207 crypto::ScopedPK11Slot system_slot = database_->GetSystemSlot();
208 base::PostTaskWithTraitsAndReplyWithResult( 208 base::PostTaskWithTraitsAndReplyWithResult(
209 FROM_HERE, 209 FROM_HERE,
210 base::TaskTraits() 210 {base::MayBlock(), base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN},
211 .WithShutdownBehavior(
212 base::TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN)
213 .MayBlock(),
214 base::BindOnce(&FilterSystemTokenCertificates, 211 base::BindOnce(&FilterSystemTokenCertificates,
215 base::Unretained(all_certs.get()), std::move(system_slot)), 212 base::Unretained(all_certs.get()), std::move(system_slot)),
216 base::BindOnce(&CertLoader::UpdateCertificates, 213 base::BindOnce(&CertLoader::UpdateCertificates,
217 weak_factory_.GetWeakPtr(), std::move(all_certs))); 214 weak_factory_.GetWeakPtr(), std::move(all_certs)));
218 } 215 }
219 216
220 void CertLoader::UpdateCertificates( 217 void CertLoader::UpdateCertificates(
221 std::unique_ptr<net::CertificateList> all_certs, 218 std::unique_ptr<net::CertificateList> all_certs,
222 std::unique_ptr<net::CertificateList> system_certs) { 219 std::unique_ptr<net::CertificateList> system_certs) {
223 DCHECK(thread_checker_.CalledOnValidThread()); 220 DCHECK(thread_checker_.CalledOnValidThread());
(...skipping 18 matching lines...) Expand all
242 for (auto& observer : observers_) 239 for (auto& observer : observers_)
243 observer.OnCertificatesLoaded(*all_certs_, initial_load); 240 observer.OnCertificatesLoaded(*all_certs_, initial_load);
244 } 241 }
245 242
246 void CertLoader::OnCertDBChanged() { 243 void CertLoader::OnCertDBChanged() {
247 VLOG(1) << "OnCertDBChanged"; 244 VLOG(1) << "OnCertDBChanged";
248 LoadCertificates(); 245 LoadCertificates();
249 } 246 }
250 247
251 } // namespace chromeos 248 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chromeos/dbus/debug_daemon_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698