| 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 #import "chrome/browser/ui/certificate_viewer_mac.h" | 5 #import "chrome/browser/ui/certificate_viewer_mac.h" |
| 6 | 6 |
| 7 #import <objc/runtime.h> | 7 #import <objc/runtime.h> |
| 8 | 8 |
| 9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // SFCertificatePanel when no policies are specified. | 128 // SFCertificatePanel when no policies are specified. |
| 129 SecPolicyRef basicPolicy = nil; | 129 SecPolicyRef basicPolicy = nil; |
| 130 OSStatus status = net::x509_util::CreateBasicX509Policy(&basicPolicy); | 130 OSStatus status = net::x509_util::CreateBasicX509Policy(&basicPolicy); |
| 131 if (status != noErr) { | 131 if (status != noErr) { |
| 132 NOTREACHED(); | 132 NOTREACHED(); |
| 133 return self; | 133 return self; |
| 134 } | 134 } |
| 135 CFArrayAppendValue(policies, basicPolicy); | 135 CFArrayAppendValue(policies, basicPolicy); |
| 136 CFRelease(basicPolicy); | 136 CFRelease(basicPolicy); |
| 137 | 137 |
| 138 status = net::x509_util::CreateRevocationPolicies(false, false, policies); | 138 status = net::x509_util::CreateRevocationPolicies(false, policies); |
| 139 if (status != noErr) { | 139 if (status != noErr) { |
| 140 NOTREACHED(); | 140 NOTREACHED(); |
| 141 return self; | 141 return self; |
| 142 } | 142 } |
| 143 | 143 |
| 144 panel_.reset([[SFCertificatePanel alloc] init]); | 144 panel_.reset([[SFCertificatePanel alloc] init]); |
| 145 [panel_ setPolicies:base::mac::CFToNSCast(policies.get())]; | 145 [panel_ setPolicies:base::mac::CFToNSCast(policies.get())]; |
| 146 return self; | 146 return self; |
| 147 } | 147 } |
| 148 | 148 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 172 | 172 |
| 173 - (void)releaseSheetWindow { | 173 - (void)releaseSheetWindow { |
| 174 panel_.reset(); | 174 panel_.reset(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 - (NSWindow*)certificatePanel { | 177 - (NSWindow*)certificatePanel { |
| 178 return panel_; | 178 return panel_; |
| 179 } | 179 } |
| 180 | 180 |
| 181 @end | 181 @end |
| OLD | NEW |