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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

Issue 1539043002: Pull SecurityStateModel out into a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 11 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
Index: chrome/browser/ui/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index a5195bdc14689d10b88cb522a16508c65b1a180d..95a30032d388672de923f9a52e30b5b8c2a94d3e 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -326,22 +326,22 @@ SkColor LocationBarView::GetColor(
}
SkColor LocationBarView::GetSecureTextColor(
- SecurityStateModel::SecurityLevel security_level) const {
+ security_state::SecurityStateModel::SecurityLevel security_level) const {
bool inverted = color_utils::IsDark(GetColor(BACKGROUND));
SkColor color;
switch (security_level) {
- case SecurityStateModel::EV_SECURE:
- case SecurityStateModel::SECURE:
+ case security_state::SecurityStateModel::EV_SECURE:
+ case security_state::SecurityStateModel::SECURE:
if (ui::MaterialDesignController::IsModeMaterial() && inverted)
return GetColor(TEXT);
color = GetColor(EV_BUBBLE_TEXT_AND_BORDER);
break;
- case SecurityStateModel::SECURITY_POLICY_WARNING:
+ case security_state::SecurityStateModel::SECURITY_POLICY_WARNING:
return GetColor(DEEMPHASIZED_TEXT);
break;
- case SecurityStateModel::SECURITY_ERROR: {
+ case security_state::SecurityStateModel::SECURITY_ERROR: {
bool md = ui::MaterialDesignController::IsModeMaterial();
if (md && inverted)
return GetColor(TEXT);
@@ -349,7 +349,7 @@ SkColor LocationBarView::GetSecureTextColor(
break;
}
- case SecurityStateModel::SECURITY_WARNING:
+ case security_state::SecurityStateModel::SECURITY_WARNING:
return GetColor(TEXT);
break;
@@ -1043,7 +1043,7 @@ bool LocationBarView::ShouldShowEVBubble() const {
const ChromeToolbarModel* chrome_toolbar_model =
static_cast<const ChromeToolbarModel*>(GetToolbarModel());
return (chrome_toolbar_model->GetSecurityLevel(false) ==
- SecurityStateModel::EV_SECURE);
+ security_state::SecurityStateModel::EV_SECURE);
}
////////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/omnibox/omnibox_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698