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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 if (infobar_delegate_ == | 174 if (infobar_delegate_ == |
175 ((type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED) ? | 175 ((type == chrome::NOTIFICATION_TAB_CONTENTS_INFOBAR_REMOVED) ? |
176 content::Details<InfoBarRemovedDetails>(details)->first : | 176 content::Details<InfoBarRemovedDetails>(details)->first : |
177 content::Details<InfoBarReplacedDetails>(details)->first)) | 177 content::Details<InfoBarReplacedDetails>(details)->first)) |
178 infobar_delegate_ = NULL; | 178 infobar_delegate_ = NULL; |
179 } | 179 } |
180 | 180 |
181 | 181 |
182 // SSLTabHelper ---------------------------------------------------------------- | 182 // SSLTabHelper ---------------------------------------------------------------- |
183 | 183 |
184 int SSLTabHelper::kUserDataKey; | 184 DEFINE_WEB_CONTENTS_USER_DATA_KEY(SSLTabHelper) |
185 | 185 |
186 SSLTabHelper::SSLTabHelper(content::WebContents* contents) | 186 SSLTabHelper::SSLTabHelper(content::WebContents* contents) |
187 : web_contents_(contents) { | 187 : web_contents_(contents) { |
188 } | 188 } |
189 | 189 |
190 SSLTabHelper::~SSLTabHelper() { | 190 SSLTabHelper::~SSLTabHelper() { |
191 } | 191 } |
192 | 192 |
193 void SSLTabHelper::ShowClientCertificateRequestDialog( | 193 void SSLTabHelper::ShowClientCertificateRequestDialog( |
194 const net::HttpNetworkSession* network_session, | 194 const net::HttpNetworkSession* network_session, |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 SSLTabHelper::SSLAddCertData* | 243 SSLTabHelper::SSLAddCertData* |
244 SSLTabHelper::GetAddCertData(SSLAddCertHandler* handler) { | 244 SSLTabHelper::GetAddCertData(SSLAddCertHandler* handler) { |
245 // Find/create the slot. | 245 // Find/create the slot. |
246 linked_ptr<SSLAddCertData>& ptr_ref = | 246 linked_ptr<SSLAddCertData>& ptr_ref = |
247 request_id_to_add_cert_data_[handler->network_request_id()]; | 247 request_id_to_add_cert_data_[handler->network_request_id()]; |
248 // Fill it if necessary. | 248 // Fill it if necessary. |
249 if (!ptr_ref.get()) | 249 if (!ptr_ref.get()) |
250 ptr_ref.reset(new SSLAddCertData(web_contents_)); | 250 ptr_ref.reset(new SSLAddCertData(web_contents_)); |
251 return ptr_ref.get(); | 251 return ptr_ref.get(); |
252 } | 252 } |
OLD | NEW |