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

Unified 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: 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
Index: chrome/browser/ui/platform_keys_certificate_selector_chromeos.h
diff --git a/chrome/browser/ui/platform_keys_certificate_selector_chromeos.h b/chrome/browser/ui/platform_keys_certificate_selector_chromeos.h
new file mode 100644
index 0000000000000000000000000000000000000000..b5f0da23fcfed02ed3331fb100a35c2749a742c7
--- /dev/null
+++ b/chrome/browser/ui/platform_keys_certificate_selector_chromeos.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
+#define CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_
+
+#include <string>
+#include <vector>
+
+#include "base/callback_forward.h"
+
+namespace content {
+class WebContents;
+}
+
+namespace net {
+class X509Certificate;
+typedef std::vector<scoped_refptr<X509Certificate>> CertificateList;
bartfab (slow) 2015/02/19 18:55:42 Nit: #include "base/memory/ref_counted.h"
pneubeck (no reviews) 2015/02/19 21:51:41 Done.
+}
+
+namespace chromeos {
+
+// Opens a constrained client certificate selection dialog under |parent|,
bartfab (slow) 2015/02/19 18:55:42 Nit: There is no |parent| argument. Did you mean |
pneubeck (no reviews) 2015/02/19 21:51:41 Done.
+// offering |certficicates| to the user and explaining that the selection will
bartfab (slow) 2015/02/19 18:55:42 Nit: s/certficicates/certificates/
pneubeck (no reviews) 2015/02/19 21:51:41 Done.
+// grant access to the extension with |extension_id|.
+// When the user has made a selection, the dialog will report back to
+// |callback|. |callback| is notified when the dialog closes in call cases; if
+// the user cancels the dialog, |callback| will be called with null.
bartfab (slow) 2015/02/19 18:55:42 Nit: s/null/a nullptr argument/
pneubeck (no reviews) 2015/02/19 21:51:41 Done.
+void ShowPlatformKeysCertificateSelector(
+ content::WebContents* web_contents,
+ const std::string& extension_id,
+ const net::CertificateList& certificates,
+ const base::Callback<void(const scoped_refptr<net::X509Certificate>&)>&
msw 2015/02/19 20:21:54 nit: maybe make a typedef for this callback to use
pneubeck (no reviews) 2015/02/19 21:51:41 Done.
+ callback);
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_UI_PLATFORM_KEYS_CERTIFICATE_SELECTOR_CHROMEOS_H_

Powered by Google App Engine
This is Rietveld 408576698