| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/page_info_bubble_view.h" | 5 #include "chrome/browser/views/page_info_bubble_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_list.h" | 9 #include "chrome/browser/browser_list.h" |
| 10 #include "chrome/browser/cert_store.h" | 10 #include "chrome/browser/cert_store.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(profile, url, ssl, | 89 : ALLOW_THIS_IN_INITIALIZER_LIST(model_(profile, url, ssl, |
| 90 show_history, this)), | 90 show_history, this)), |
| 91 parent_window_(parent_window), | 91 parent_window_(parent_window), |
| 92 cert_id_(ssl.cert_id()), | 92 cert_id_(ssl.cert_id()), |
| 93 info_bubble_(NULL), | 93 info_bubble_(NULL), |
| 94 help_center_link_(NULL), | 94 help_center_link_(NULL), |
| 95 ALLOW_THIS_IN_INITIALIZER_LIST(resize_animation_(this)), | 95 ALLOW_THIS_IN_INITIALIZER_LIST(resize_animation_(this)), |
| 96 animation_start_height_(0) { | 96 animation_start_height_(0) { |
| 97 if (cert_id_ > 0) { | 97 if (cert_id_ > 0) { |
| 98 scoped_refptr<net::X509Certificate> cert; | 98 scoped_refptr<net::X509Certificate> cert; |
| 99 CertStore::GetSharedInstance()->RetrieveCert(cert_id_, &cert); | 99 CertStore::GetInstance()->RetrieveCert(cert_id_, &cert); |
| 100 // When running with fake certificate (Chrome Frame) or Gears in offline | 100 // When running with fake certificate (Chrome Frame) or Gears in offline |
| 101 // mode, we have no os certificate, so there is no cert to show. Don't | 101 // mode, we have no os certificate, so there is no cert to show. Don't |
| 102 // bother showing the cert info link in that case. | 102 // bother showing the cert info link in that case. |
| 103 if (!cert.get() || !cert->os_cert_handle()) | 103 if (!cert.get() || !cert->os_cert_handle()) |
| 104 cert_id_ = 0; | 104 cert_id_ = 0; |
| 105 } | 105 } |
| 106 LayoutSections(); | 106 LayoutSections(); |
| 107 } | 107 } |
| 108 | 108 |
| 109 PageInfoBubbleView::~PageInfoBubbleView() { | 109 PageInfoBubbleView::~PageInfoBubbleView() { |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 PageInfoBubbleView* page_info_bubble = | 346 PageInfoBubbleView* page_info_bubble = |
| 347 new PageInfoBubbleView(parent, profile, url, ssl, show_history); | 347 new PageInfoBubbleView(parent, profile, url, ssl, show_history); |
| 348 InfoBubble* info_bubble = | 348 InfoBubble* info_bubble = |
| 349 InfoBubble::Show(browser_view->GetWidget(), bounds, | 349 InfoBubble::Show(browser_view->GetWidget(), bounds, |
| 350 BubbleBorder::TOP_LEFT, | 350 BubbleBorder::TOP_LEFT, |
| 351 page_info_bubble, page_info_bubble); | 351 page_info_bubble, page_info_bubble); |
| 352 page_info_bubble->set_info_bubble(info_bubble); | 352 page_info_bubble->set_info_bubble(info_bubble); |
| 353 } | 353 } |
| 354 | 354 |
| 355 } | 355 } |
| OLD | NEW |