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/ssl/ssl_client_certificate_selector.h" | 5 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" |
6 | 6 |
7 #import <SecurityInterface/SFChooseIdentityPanel.h> | 7 #import <SecurityInterface/SFChooseIdentityPanel.h> |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 [panel setInformativeText:message]; | 219 [panel setInformativeText:message]; |
220 [panel setDefaultButtonTitle:l10n_util::GetNSString(IDS_OK)]; | 220 [panel setDefaultButtonTitle:l10n_util::GetNSString(IDS_OK)]; |
221 [panel setAlternateButtonTitle:l10n_util::GetNSString(IDS_CANCEL)]; | 221 [panel setAlternateButtonTitle:l10n_util::GetNSString(IDS_CANCEL)]; |
222 SecPolicyRef sslPolicy; | 222 SecPolicyRef sslPolicy; |
223 if (net::x509_util::CreateSSLClientPolicy(&sslPolicy) == noErr) { | 223 if (net::x509_util::CreateSSLClientPolicy(&sslPolicy) == noErr) { |
224 [panel setPolicies:(id)sslPolicy]; | 224 [panel setPolicies:(id)sslPolicy]; |
225 CFRelease(sslPolicy); | 225 CFRelease(sslPolicy); |
226 } | 226 } |
227 | 227 |
228 window_ = new ConstrainedWindowMac( | 228 window_ = new ConstrainedWindowMac( |
229 tabContents, | 229 tabContents->web_contents(), |
230 new ConstrainedSFChooseIdentityPanel( | 230 new ConstrainedSFChooseIdentityPanel( |
231 panel, self, | 231 panel, self, |
232 @selector(sheetDidEnd:returnCode:context:), | 232 @selector(sheetDidEnd:returnCode:context:), |
233 identities_, title)); | 233 identities_, title)); |
234 observer_->StartObserving(); | 234 observer_->StartObserving(); |
235 // Note: SFChooseIdentityPanel does not take a reference to itself while the | 235 // Note: SFChooseIdentityPanel does not take a reference to itself while the |
236 // sheet is open. ConstrainedSFChooseIdentityPanel will release ownership | 236 // sheet is open. ConstrainedSFChooseIdentityPanel will release ownership |
237 // on destruction. | 237 // on destruction. |
238 } | 238 } |
239 | 239 |
240 @end | 240 @end |
OLD | NEW |