| Index: chrome/browser/chromeos/platform_keys/platform_keys_service.cc
|
| diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_service.cc b/chrome/browser/chromeos/platform_keys/platform_keys_service.cc
|
| index ebaed7ba5e3840c0e812946239fb8e389ad3fdfc..07974de472282dbc5ac5757c0e79498c92638fdd 100644
|
| --- a/chrome/browser/chromeos/platform_keys/platform_keys_service.cc
|
| +++ b/chrome/browser/chromeos/platform_keys/platform_keys_service.cc
|
| @@ -10,6 +10,7 @@
|
| #include "chrome/browser/chromeos/platform_keys/platform_keys.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "extensions/browser/state_store.h"
|
| +#include "net/cert/x509_certificate.h"
|
|
|
| using content::BrowserThread;
|
|
|
| @@ -110,6 +111,19 @@ void PlatformKeysService::Sign(const std::string& token_id,
|
| browser_context_));
|
| }
|
|
|
| +void PlatformKeysService::SelectClientCertificates(
|
| + const platform_keys::ClientCertificateRequest& request,
|
| + const std::string& extension_id,
|
| + const SelectCertificatesCallback& callback) {
|
| + DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
|
| +
|
| + platform_keys::subtle::SelectClientCertificates(
|
| + request,
|
| + base::Bind(&PlatformKeysService::SelectClientCertificatesCallback,
|
| + weak_factory_.GetWeakPtr(), extension_id, callback),
|
| + browser_context_);
|
| +}
|
| +
|
| void PlatformKeysService::RegisterPublicKey(
|
| const std::string& extension_id,
|
| const std::string& public_key_spki_der,
|
| @@ -165,6 +179,15 @@ void PlatformKeysService::GenerateRSAKeyCallback(
|
| RegisterPublicKey(extension_id, public_key_spki_der, wrapped_callback);
|
| }
|
|
|
| +void PlatformKeysService::SelectClientCertificatesCallback(
|
| + const std::string& extension_id,
|
| + const SelectCertificatesCallback& callback,
|
| + scoped_ptr<net::CertificateList> matches,
|
| + const std::string& error_message) {
|
| + // TODO(pneubeck): Remove all certs that the extension doesn't have access to.
|
| + callback.Run(matches.Pass(), error_message);
|
| +}
|
| +
|
| void PlatformKeysService::RegisterPublicKeyGotPlatformKeys(
|
| const std::string& extension_id,
|
| const std::string& public_key_spki_der,
|
|
|