Chromium Code Reviews| Index: chrome/browser/ui/extensions/hosted_app_browser_controller.cc |
| diff --git a/chrome/browser/ui/extensions/hosted_app_browser_controller.cc b/chrome/browser/ui/extensions/hosted_app_browser_controller.cc |
| index 220f990d43e352e93995f7624e4e9d393a1823f3..5834206a1226b2a55a9d588fafe1a67526beef18 100644 |
| --- a/chrome/browser/ui/extensions/hosted_app_browser_controller.cc |
| +++ b/chrome/browser/ui/extensions/hosted_app_browser_controller.cc |
| @@ -6,7 +6,7 @@ |
| #include "base/command_line.h" |
| #include "chrome/browser/profiles/profile.h" |
| -#include "chrome/browser/ssl/connection_security.h" |
| +#include "chrome/browser/ssl/security_state_model.h" |
| #include "chrome/browser/ui/browser.h" |
| #include "chrome/browser/ui/browser_window.h" |
| #include "chrome/browser/ui/host_desktop.h" |
| @@ -77,7 +77,7 @@ bool HostedAppBrowserController::ShouldShowLocationBar() const { |
| ExtensionRegistry::Get(browser_->profile())->GetExtensionById( |
| extension_id_, ExtensionRegistry::EVERYTHING); |
| - const content::WebContents* web_contents = |
| + content::WebContents* web_contents = |
| browser_->tab_strip_model()->GetActiveWebContents(); |
| // Default to not showing the location bar if either |extension| or |
| @@ -92,10 +92,13 @@ bool HostedAppBrowserController::ShouldShowLocationBar() const { |
| if (web_contents->GetLastCommittedURL().is_empty()) |
| return false; |
| - connection_security::SecurityLevel security_level = |
| - connection_security::GetSecurityLevelForWebContents(web_contents); |
| - if (security_level == connection_security::SECURITY_ERROR) |
| - return true; |
| + SecurityStateModel* model = SecurityStateModel::FromWebContents(web_contents); |
| + if (model) { |
|
Peter Kasting
2015/09/03 18:25:53
Nit: Combine these two conditionals
estark
2015/09/03 22:11:57
Done.
|
| + if (model->security_info().security_level == |
| + SecurityStateModel::SECURITY_ERROR) { |
|
Peter Kasting
2015/09/03 18:25:53
Nit: No {} necessary
estark
2015/09/03 22:11:57
Done.
|
| + return true; |
| + } |
| + } |
| GURL launch_url = AppLaunchInfo::GetLaunchWebURL(extension); |
| return !(IsSameOriginOrMoreSecure(launch_url, |