| OLD | NEW |
| 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> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // SFCertificatePanel when no policies are specified. | 45 // SFCertificatePanel when no policies are specified. |
| 46 SecPolicyRef basic_policy = NULL; | 46 SecPolicyRef basic_policy = NULL; |
| 47 OSStatus status = net::x509_util::CreateBasicX509Policy(&basic_policy); | 47 OSStatus status = net::x509_util::CreateBasicX509Policy(&basic_policy); |
| 48 if (status != noErr) { | 48 if (status != noErr) { |
| 49 NOTREACHED(); | 49 NOTREACHED(); |
| 50 return; | 50 return; |
| 51 } | 51 } |
| 52 CFArrayAppendValue(policies, basic_policy); | 52 CFArrayAppendValue(policies, basic_policy); |
| 53 CFRelease(basic_policy); | 53 CFRelease(basic_policy); |
| 54 | 54 |
| 55 status = net::x509_util::CreateRevocationPolicies(false, policies); | 55 status = net::x509_util::CreateRevocationPolicies(false, false, policies); |
| 56 if (status != noErr) { | 56 if (status != noErr) { |
| 57 NOTREACHED(); | 57 NOTREACHED(); |
| 58 return; | 58 return; |
| 59 } | 59 } |
| 60 | 60 |
| 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 } |
| OLD | NEW |