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

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: unit test debugging Created 5 years 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 dc6093092ee3cdfe8f137100035fd50d69cb724e..2dab334ee70ca29e008585608c52e870a32c40b4 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -329,22 +329,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);
@@ -352,7 +352,7 @@ SkColor LocationBarView::GetSecureTextColor(
break;
}
- case SecurityStateModel::SECURITY_WARNING:
+ case security_state::SecurityStateModel::SECURITY_WARNING:
return GetColor(TEXT);
break;
@@ -1046,7 +1046,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);
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698