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

Side by Side Diff: chrome/browser/ui/platform_keys_certificate_selector_chromeos.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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/callback_forward.h"
12 #include "base/memory/ref_counted.h"
13
14 namespace content {
15 class WebContents;
16 }
17
18 namespace net {
19 class X509Certificate;
20 typedef std::vector<scoped_refptr<X509Certificate>> CertificateList;
21 }
22
23 namespace chromeos {
24
25 typedef base::Callback<void(
26 const scoped_refptr<net::X509Certificate>& selected_certificate)>
27 CertificateSelectedCallback;
28
29 // Opens a constrained client certificate selection dialog associated with
30 // |web_contents|, offering |certificates| to the user and explaining that the
31 // selection will grant access to the extension with |extension_id|.
32 // When the user has made a selection, the dialog will report back to
33 // |callback|. |callback| is notified when the dialog closes in call cases; if
34 // the user cancels the dialog, |callback| will be called with a nullptr
35 // argument.
36 void ShowPlatformKeysCertificateSelector(
37 content::WebContents* web_contents,
38 const std::string& extension_id,
39 const net::CertificateList& certificates,
40 const CertificateSelectedCallback& callback);
41
42 } // namespace chromeos
43
44 #endif // CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698