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

Side by Side Diff: chrome/browser/ui/cocoa/certificate_viewer_mac.mm

Issue 13006020: net: extract net/cert out of net/base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/certificate_viewer.h" 5 #include "chrome/browser/certificate_viewer.h"
6 6
7 #include <Security/Security.h> 7 #include <Security/Security.h>
8 #include <SecurityInterface/SFCertificatePanel.h> 8 #include <SecurityInterface/SFCertificatePanel.h>
9 9
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/mac/foundation_util.h" 12 #include "base/mac/foundation_util.h"
13 #include "base/mac/scoped_cftyperef.h" 13 #include "base/mac/scoped_cftyperef.h"
14 #include "net/base/x509_certificate.h" 14 #include "net/cert/x509_certificate.h"
15 #include "net/base/x509_util_mac.h" 15 #include "net/cert/x509_util_mac.h"
16 16
17 void ShowCertificateViewer(content::WebContents* web_contents, 17 void ShowCertificateViewer(content::WebContents* web_contents,
18 gfx::NativeWindow parent, 18 gfx::NativeWindow parent,
19 net::X509Certificate* cert) { 19 net::X509Certificate* cert) {
20 base::mac::ScopedCFTypeRef<CFArrayRef> cert_chain( 20 base::mac::ScopedCFTypeRef<CFArrayRef> cert_chain(
21 cert->CreateOSCertChainForCert()); 21 cert->CreateOSCertChainForCert());
22 NSArray* certificates = base::mac::CFToNSCast(cert_chain.get()); 22 NSArray* certificates = base::mac::CFToNSCast(cert_chain.get());
23 23
24 // Explicitly disable revocation checking, regardless of user preferences 24 // Explicitly disable revocation checking, regardless of user preferences
25 // or system settings. The behaviour of SFCertificatePanel is to call 25 // or system settings. The behaviour of SFCertificatePanel is to call
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 SFCertificatePanel* panel = [[SFCertificatePanel alloc] init]; 61 SFCertificatePanel* panel = [[SFCertificatePanel alloc] init];
62 [panel setPolicies:(id)policies.get()]; 62 [panel setPolicies:(id)policies.get()];
63 [panel beginSheetForWindow:parent 63 [panel beginSheetForWindow:parent
64 modalDelegate:nil 64 modalDelegate:nil
65 didEndSelector:NULL 65 didEndSelector:NULL
66 contextInfo:NULL 66 contextInfo:NULL
67 certificates:certificates 67 certificates:certificates
68 showGroup:YES]; 68 showGroup:YES];
69 // The SFCertificatePanel releases itself when the sheet is dismissed. 69 // The SFCertificatePanel releases itself when the sheet is dismissed.
70 } 70 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/certificate_dialogs.h ('k') | chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698