Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7781)

Unified Diff: chrome/browser/ui/extensions/hosted_app_browser_controller.cc

Issue 1314843007: Refactor connection_security into SecurityStateModel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: create SecurityStateModel for chromeos login webview Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..f59a7fdfa128411c7f20f7e5a4de42462434c6eb 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,9 +92,10 @@ 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)
+ SecurityStateModel* model = SecurityStateModel::FromWebContents(web_contents);
+ if (model &&
+ model->security_info().security_level ==
+ SecurityStateModel::SECURITY_ERROR)
return true;
GURL launch_url = AppLaunchInfo::GetLaunchWebURL(extension);
« no previous file with comments | « chrome/browser/ui/cocoa/omnibox/omnibox_view_mac.mm ('k') | chrome/browser/ui/tab_helpers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698