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

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

Issue 112913004: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (SecIdentityCreateWithCertificate(NULL, cert, &identity) == noErr) { 136 if (SecIdentityCreateWithCertificate(NULL, cert, &identity) == noErr) {
137 CFArrayAppendValue(identities_, identity); 137 CFArrayAppendValue(identities_, identity);
138 CFRelease(identity); 138 CFRelease(identity);
139 certificates_.push_back(observer_->cert_request_info()->client_certs[i]); 139 certificates_.push_back(observer_->cert_request_info()->client_certs[i]);
140 } 140 }
141 } 141 }
142 142
143 // Get the message to display: 143 // Get the message to display:
144 NSString* message = l10n_util::GetNSStringF( 144 NSString* message = l10n_util::GetNSStringF(
145 IDS_CLIENT_CERT_DIALOG_TEXT, 145 IDS_CLIENT_CERT_DIALOG_TEXT,
146 ASCIIToUTF16(observer_->cert_request_info()->host_and_port.ToString())); 146 base::ASCIIToUTF16(
147 observer_->cert_request_info()->host_and_port.ToString()));
147 148
148 // Create and set up a system choose-identity panel. 149 // Create and set up a system choose-identity panel.
149 panel_.reset([[SFChooseIdentityPanel alloc] init]); 150 panel_.reset([[SFChooseIdentityPanel alloc] init]);
150 [panel_ setInformativeText:message]; 151 [panel_ setInformativeText:message];
151 [panel_ setDefaultButtonTitle:l10n_util::GetNSString(IDS_OK)]; 152 [panel_ setDefaultButtonTitle:l10n_util::GetNSString(IDS_OK)];
152 [panel_ setAlternateButtonTitle:l10n_util::GetNSString(IDS_CANCEL)]; 153 [panel_ setAlternateButtonTitle:l10n_util::GetNSString(IDS_CANCEL)];
153 SecPolicyRef sslPolicy; 154 SecPolicyRef sslPolicy;
154 if (net::x509_util::CreateSSLClientPolicy(&sslPolicy) == noErr) { 155 if (net::x509_util::CreateSSLClientPolicy(&sslPolicy) == noErr) {
155 [panel_ setPolicies:(id)sslPolicy]; 156 [panel_ setPolicies:(id)sslPolicy];
156 CFRelease(sslPolicy); 157 CFRelease(sslPolicy);
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 } 231 }
231 232
232 - (void)onConstrainedWindowClosed { 233 - (void)onConstrainedWindowClosed {
233 observer_->StopObserving(); 234 observer_->StopObserving();
234 panel_.reset(); 235 panel_.reset();
235 constrainedWindow_.reset(); 236 constrainedWindow_.reset();
236 [self release]; 237 [self release];
237 } 238 }
238 239
239 @end 240 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698