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

Side by Side Diff: net/cert/nss_cert_database_chromeos.cc

Issue 2711113002: net: remove CryptoModuleList typedef (Closed)
Patch Set: more std::moves Created 3 years, 9 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 | « net/cert/nss_cert_database_chromeos.h ('k') | net/cert/nss_cert_database_chromeos_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "net/cert/nss_cert_database_chromeos.h" 5 #include "net/cert/nss_cert_database_chromeos.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <pk11pub.h> 8 #include <pk11pub.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 base::Unretained(raw_certs)), 58 base::Unretained(raw_certs)),
59 base::Bind(callback, base::Passed(&certs))); 59 base::Bind(callback, base::Passed(&certs)));
60 } 60 }
61 61
62 crypto::ScopedPK11Slot NSSCertDatabaseChromeOS::GetSystemSlot() const { 62 crypto::ScopedPK11Slot NSSCertDatabaseChromeOS::GetSystemSlot() const {
63 if (system_slot_) 63 if (system_slot_)
64 return crypto::ScopedPK11Slot(PK11_ReferenceSlot(system_slot_.get())); 64 return crypto::ScopedPK11Slot(PK11_ReferenceSlot(system_slot_.get()));
65 return crypto::ScopedPK11Slot(); 65 return crypto::ScopedPK11Slot();
66 } 66 }
67 67
68 void NSSCertDatabaseChromeOS::ListModules(CryptoModuleList* modules, 68 void NSSCertDatabaseChromeOS::ListModules(
69 bool need_rw) const { 69 std::vector<crypto::ScopedPK11Slot>* modules,
70 bool need_rw) const {
70 NSSCertDatabase::ListModules(modules, need_rw); 71 NSSCertDatabase::ListModules(modules, need_rw);
71 72
72 size_t pre_size = modules->size(); 73 size_t pre_size = modules->size();
73 modules->erase( 74 modules->erase(
74 std::remove_if( 75 std::remove_if(
75 modules->begin(), 76 modules->begin(),
76 modules->end(), 77 modules->end(),
77 NSSProfileFilterChromeOS::ModuleNotAllowedForProfilePredicate( 78 NSSProfileFilterChromeOS::ModuleNotAllowedForProfilePredicate(
78 profile_filter_)), 79 profile_filter_)),
79 modules->end()); 80 modules->end());
(...skipping 11 matching lines...) Expand all
91 certs->begin(), 92 certs->begin(),
92 certs->end(), 93 certs->end(),
93 NSSProfileFilterChromeOS::CertNotAllowedForProfilePredicate( 94 NSSProfileFilterChromeOS::CertNotAllowedForProfilePredicate(
94 profile_filter)), 95 profile_filter)),
95 certs->end()); 96 certs->end());
96 DVLOG(1) << "filtered " << pre_size - certs->size() << " of " << pre_size 97 DVLOG(1) << "filtered " << pre_size - certs->size() << " of " << pre_size
97 << " certs"; 98 << " certs";
98 } 99 }
99 100
100 } // namespace net 101 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/nss_cert_database_chromeos.h ('k') | net/cert/nss_cert_database_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698