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_tab_helper.h" | 5 #include "chrome/browser/ssl/ssl_tab_helper.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 } | 114 } |
115 | 115 |
116 string16 SSLCertResultInfoBarDelegate::GetButtonLabel( | 116 string16 SSLCertResultInfoBarDelegate::GetButtonLabel( |
117 InfoBarButton button) const { | 117 InfoBarButton button) const { |
118 DCHECK_EQ(BUTTON_OK, button); | 118 DCHECK_EQ(BUTTON_OK, button); |
119 return l10n_util::GetStringUTF16(IDS_ADD_CERT_SUCCESS_INFOBAR_BUTTON); | 119 return l10n_util::GetStringUTF16(IDS_ADD_CERT_SUCCESS_INFOBAR_BUTTON); |
120 } | 120 } |
121 | 121 |
122 bool SSLCertResultInfoBarDelegate::Accept() { | 122 bool SSLCertResultInfoBarDelegate::Accept() { |
123 ShowCertificateViewer( | 123 ShowCertificateViewer( |
124 owner()->GetWebContents(), | 124 owner()->web_contents(), |
125 owner()->GetWebContents()->GetView()->GetTopLevelNativeWindow(), | 125 owner()->web_contents()->GetView()->GetTopLevelNativeWindow(), |
126 cert_); | 126 cert_); |
127 return false; // Hiding the infobar just as the dialog opens looks weird. | 127 return false; // Hiding the infobar just as the dialog opens looks weird. |
128 } | 128 } |
129 | 129 |
130 } // namespace | 130 } // namespace |
131 | 131 |
132 | 132 |
133 // SSLTabHelper::SSLAddCertData ------------------------------------------------ | 133 // SSLTabHelper::SSLAddCertData ------------------------------------------------ |
134 | 134 |
135 class SSLTabHelper::SSLAddCertData | 135 class SSLTabHelper::SSLAddCertData |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 SSLTabHelper::SSLAddCertData* | 265 SSLTabHelper::SSLAddCertData* |
266 SSLTabHelper::GetAddCertData(SSLAddCertHandler* handler) { | 266 SSLTabHelper::GetAddCertData(SSLAddCertHandler* handler) { |
267 // Find/create the slot. | 267 // Find/create the slot. |
268 linked_ptr<SSLAddCertData>& ptr_ref = | 268 linked_ptr<SSLAddCertData>& ptr_ref = |
269 request_id_to_add_cert_data_[handler->network_request_id()]; | 269 request_id_to_add_cert_data_[handler->network_request_id()]; |
270 // Fill it if necessary. | 270 // Fill it if necessary. |
271 if (!ptr_ref.get()) | 271 if (!ptr_ref.get()) |
272 ptr_ref.reset(new SSLAddCertData(web_contents_)); | 272 ptr_ref.reset(new SSLAddCertData(web_contents_)); |
273 return ptr_ref.get(); | 273 return ptr_ref.get(); |
274 } | 274 } |
OLD | NEW |