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

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

Issue 18346006: Update OS X to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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 #import "chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h" 5 #import "chrome/browser/ui/cocoa/ssl_client_certificate_selector_cocoa.h"
6 6
7 #import <SecurityInterface/SFChooseIdentityPanel.h> 7 #import <SecurityInterface/SFChooseIdentityPanel.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 - (void)sheetDidEnd:(NSWindow*)parent 105 - (void)sheetDidEnd:(NSWindow*)parent
106 returnCode:(NSInteger)returnCode 106 returnCode:(NSInteger)returnCode
107 context:(void*)context { 107 context:(void*)context {
108 net::X509Certificate* cert = NULL; 108 net::X509Certificate* cert = NULL;
109 if (returnCode == NSFileHandlingPanelOKButton) { 109 if (returnCode == NSFileHandlingPanelOKButton) {
110 CFRange range = CFRangeMake(0, CFArrayGetCount(identities_)); 110 CFRange range = CFRangeMake(0, CFArrayGetCount(identities_));
111 CFIndex index = 111 CFIndex index =
112 CFArrayGetFirstIndexOfValue(identities_, range, [panel_ identity]); 112 CFArrayGetFirstIndexOfValue(identities_, range, [panel_ identity]);
113 if (index != -1) 113 if (index != -1)
114 cert = certificates_[index]; 114 cert = certificates_[index].get();
115 else 115 else
116 NOTREACHED(); 116 NOTREACHED();
117 } 117 }
118 118
119 // Finally, tell the backend which identity (or none) the user selected. 119 // Finally, tell the backend which identity (or none) the user selected.
120 observer_->StopObserving(); 120 observer_->StopObserving();
121 observer_->CertificateSelected(cert); 121 observer_->CertificateSelected(cert);
122 122
123 if (!closePending_) 123 if (!closePending_)
124 constrainedWindow_->CloseWebContentsModalDialog(); 124 constrainedWindow_->CloseWebContentsModalDialog();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 // NOOP 224 // NOOP
225 } 225 }
226 226
227 - (void)onConstrainedWindowClosed { 227 - (void)onConstrainedWindowClosed {
228 panel_.reset(); 228 panel_.reset();
229 constrainedWindow_.reset(); 229 constrainedWindow_.reset();
230 [self release]; 230 [self release];
231 } 231 }
232 232
233 @end 233 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/run_loop_testing.mm ('k') | chrome/browser/ui/cocoa/tabpose_window_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698