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

Unified Diff: chrome/browser/chromeos/platform_keys/platform_keys_service.h

Issue 927293002: platformKeys: Hook up the certificate selection dialog to selectClientCertificates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cert_perms
Patch Set: Rebased. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/platform_keys/platform_keys_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/platform_keys/platform_keys_service.h
diff --git a/chrome/browser/chromeos/platform_keys/platform_keys_service.h b/chrome/browser/chromeos/platform_keys/platform_keys_service.h
index 082ef20071fe8b5a55ca0aa94f1777e4a5c5663a..23d44d35c8a5440668dff76b7bda7a46755b4111 100644
--- a/chrome/browser/chromeos/platform_keys/platform_keys_service.h
+++ b/chrome/browser/chromeos/platform_keys/platform_keys_service.h
@@ -19,6 +19,7 @@
namespace content {
class BrowserContext;
+class WebContents;
}
namespace base {
@@ -47,9 +48,8 @@ class PlatformKeysService : public KeyedService {
// can happen by exposing UI to let the user select.
class SelectDelegate {
public:
- // TODO(pneubeck): Handle if the selection was aborted, e.g. by the user.
- using CertificateSelectedCallback =
- base::Callback<void(scoped_refptr<net::X509Certificate> selection)>;
+ using CertificateSelectedCallback = base::Callback<void(
+ const scoped_refptr<net::X509Certificate>& selection)>;
SelectDelegate();
virtual ~SelectDelegate();
@@ -61,9 +61,13 @@ class PlatformKeysService : public KeyedService {
// for this cert. By passing null to |callback|, no cert will be selected.
// Must eventually call |callback| or be destructed. |callback| must not be
// called after this delegate is destructed.
+ // |web_contents| and |context| provide the context in which the
+ // certificates were requested and are not null.
virtual void Select(const std::string& extension_id,
const net::CertificateList& certs,
- const CertificateSelectedCallback& callback) = 0;
+ const CertificateSelectedCallback& callback,
+ content::WebContents* web_contents,
+ content::BrowserContext* context) = 0;
private:
DISALLOW_ASSIGN(SelectDelegate);
@@ -165,11 +169,13 @@ class PlatformKeysService : public KeyedService {
// returned.
// |callback| will be invoked with these certificates or an error message.
// Will only call back during the lifetime of this object.
+ // |web_contents| must not be null.
void SelectClientCertificates(
const platform_keys::ClientCertificateRequest& request,
bool interactive,
const std::string& extension_id,
- const SelectCertificatesCallback& callback);
+ const SelectCertificatesCallback& callback,
+ content::WebContents* web_contents);
private:
using GetPlatformKeysCallback =
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/chromeos/platform_keys/platform_keys_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698