| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/platform_keys/platform_keys_service.h" | 5 #include "chrome/browser/chromeos/platform_keys/platform_keys_service.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 // If the type field does not contain any entries, certificates of all | 420 // If the type field does not contain any entries, certificates of all |
| 421 // types shall be returned. | 421 // types shall be returned. |
| 422 if (!request_.certificate_key_types.empty()) { | 422 if (!request_.certificate_key_types.empty()) { |
| 423 net::X509Certificate::PublicKeyType actual_key_type = | 423 net::X509Certificate::PublicKeyType actual_key_type = |
| 424 net::X509Certificate::kPublicKeyTypeUnknown; | 424 net::X509Certificate::kPublicKeyTypeUnknown; |
| 425 size_t unused_key_size = 0; | 425 size_t unused_key_size = 0; |
| 426 net::X509Certificate::GetPublicKeyInfo( | 426 net::X509Certificate::GetPublicKeyInfo( |
| 427 certificate->os_cert_handle(), &unused_key_size, &actual_key_type); | 427 certificate->os_cert_handle(), &unused_key_size, &actual_key_type); |
| 428 const std::vector<net::X509Certificate::PublicKeyType>& accepted_types = | 428 const std::vector<net::X509Certificate::PublicKeyType>& accepted_types = |
| 429 request_.certificate_key_types; | 429 request_.certificate_key_types; |
| 430 if (!ContainsValue(accepted_types, actual_key_type)) | 430 if (!base::ContainsValue(accepted_types, actual_key_type)) |
| 431 continue; | 431 continue; |
| 432 } | 432 } |
| 433 | 433 |
| 434 matches_.push_back(std::move(certificate)); | 434 matches_.push_back(std::move(certificate)); |
| 435 } | 435 } |
| 436 DoStep(); | 436 DoStep(); |
| 437 } | 437 } |
| 438 | 438 |
| 439 // If |input_client_certificates_| is given, removes from |matches_| all | 439 // If |input_client_certificates_| is given, removes from |matches_| all |
| 440 // certificates that are not elements of |input_client_certificates_|. | 440 // certificates that are not elements of |input_client_certificates_|. |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 while (!tasks_.empty() && tasks_.front()->IsDone()) | 632 while (!tasks_.empty() && tasks_.front()->IsDone()) |
| 633 tasks_.pop(); | 633 tasks_.pop(); |
| 634 | 634 |
| 635 // Now either the queue is empty or the next task is not finished yet and it | 635 // Now either the queue is empty or the next task is not finished yet and it |
| 636 // can be started. | 636 // can be started. |
| 637 if (!tasks_.empty()) | 637 if (!tasks_.empty()) |
| 638 tasks_.front()->Start(); | 638 tasks_.front()->Start(); |
| 639 } | 639 } |
| 640 | 640 |
| 641 } // namespace chromeos | 641 } // namespace chromeos |
| OLD | NEW |