OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/certificate_provider/certificate_provider_serv
ice.h" | 5 #include "chrome/browser/chromeos/certificate_provider/certificate_provider_serv
ice.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 return std::vector<std::string>(provider_extensions_.begin(), | 86 return std::vector<std::string>(provider_extensions_.begin(), |
87 provider_extensions_.end()); | 87 provider_extensions_.end()); |
88 } | 88 } |
89 | 89 |
90 void BroadcastCertificateRequest(int cert_request_id) override { | 90 void BroadcastCertificateRequest(int cert_request_id) override { |
91 EXPECT_EQ(expected_request_type_, RequestType::GET_CERTIFICATES); | 91 EXPECT_EQ(expected_request_type_, RequestType::GET_CERTIFICATES); |
92 last_cert_request_id_ = cert_request_id; | 92 last_cert_request_id_ = cert_request_id; |
93 expected_request_type_ = RequestType::NONE; | 93 expected_request_type_ = RequestType::NONE; |
94 } | 94 } |
95 | 95 |
96 bool DispatchSignRequestToExtension(const std::string& extension_id, | 96 bool DispatchSignRequestToExtension( |
97 int sign_request_id, | 97 const std::string& extension_id, |
98 net::SSLPrivateKey::Hash hash, | 98 int sign_request_id, |
99 const std::string& input) override { | 99 net::SSLPrivateKey::Hash hash, |
| 100 const scoped_refptr<net::X509Certificate>& certificate, |
| 101 const std::string& input) override { |
100 EXPECT_EQ(expected_request_type_, RequestType::SIGN); | 102 EXPECT_EQ(expected_request_type_, RequestType::SIGN); |
101 last_sign_request_id_ = sign_request_id; | 103 last_sign_request_id_ = sign_request_id; |
102 last_extension_id_ = extension_id; | 104 last_extension_id_ = extension_id; |
103 expected_request_type_ = RequestType::NONE; | 105 expected_request_type_ = RequestType::NONE; |
104 return true; | 106 return true; |
105 } | 107 } |
106 | 108 |
107 // Prepares this delegate for the dispatch of a request of type | 109 // Prepares this delegate for the dispatch of a request of type |
108 // |expected_request_type|. The first request of the right type will cause | 110 // |expected_request_type|. The first request of the right type will cause |
109 // |expected_request_type_| to be reset to NONE. The request's arguments will | 111 // |expected_request_type_| to be reset to NONE. The request's arguments will |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 EXPECT_EQ(net::OK, error); | 363 EXPECT_EQ(net::OK, error); |
362 | 364 |
363 // Unload the extension. | 365 // Unload the extension. |
364 service_->OnExtensionUnloaded(kExtension1); | 366 service_->OnExtensionUnloaded(kExtension1); |
365 | 367 |
366 task_runner_->RunUntilIdle(); | 368 task_runner_->RunUntilIdle(); |
367 EXPECT_EQ(net::ERR_FAILED, error); | 369 EXPECT_EQ(net::ERR_FAILED, error); |
368 } | 370 } |
369 | 371 |
370 } // namespace chromeos | 372 } // namespace chromeos |
OLD | NEW |