| 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/ui/views/location_bar/page_info_helper.h" | 5 #include "chrome/browser/ui/views/location_bar/page_info_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/search/search.h" | 7 #include "chrome/browser/search/search.h" |
| 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 9 #include "components/omnibox/browser/omnibox_view.h" | 9 #include "components/omnibox/browser/omnibox_view.h" |
| 10 #include "content/public/browser/navigation_controller.h" | 10 #include "content/public/browser/navigation_controller.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 WebContents* tab = location_bar_->GetWebContents(); | 29 WebContents* tab = location_bar_->GetWebContents(); |
| 30 if (!tab) | 30 if (!tab) |
| 31 return; | 31 return; |
| 32 | 32 |
| 33 // Important to use GetVisibleEntry to match what's showing in the omnibox. | 33 // Important to use GetVisibleEntry to match what's showing in the omnibox. |
| 34 NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry(); | 34 NavigationEntry* nav_entry = tab->GetController().GetVisibleEntry(); |
| 35 // The visible entry can be NULL in the case of window.open(""). | 35 // The visible entry can be NULL in the case of window.open(""). |
| 36 if (!nav_entry) | 36 if (!nav_entry) |
| 37 return; | 37 return; |
| 38 | 38 |
| 39 SecurityStateModel* security_model = SecurityStateModel::FromWebContents(tab); |
| 40 DCHECK(security_model); |
| 41 |
| 39 location_bar_->delegate()->ShowWebsiteSettings( | 42 location_bar_->delegate()->ShowWebsiteSettings( |
| 40 tab, nav_entry->GetURL(), nav_entry->GetSSL()); | 43 tab, nav_entry->GetURL(), security_model->GetSecurityInfo()); |
| 41 } | 44 } |
| OLD | NEW |