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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.cc

Issue 1135373003: Revert of Move SecurityLevel into a class of its own (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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/views/omnibox/omnibox_view_views.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/omnibox/omnibox_view_views.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 56b09d13c8e0ffe13eea1ff6fd42f5f97ce953e6..b5a2347971df7e9588de5f4c727576343c47ae45 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -137,7 +137,7 @@
const gfx::FontList& font_list)
: OmniboxView(profile, controller, command_updater),
popup_window_mode_(popup_window_mode),
- security_level_(ConnectionSecurityHelper::NONE),
+ security_level_(ToolbarModel::NONE),
saved_selection_for_focus_change_(gfx::Range::InvalidRange()),
ime_composing_before_change_(false),
delete_at_end_pressed_(false),
@@ -223,8 +223,7 @@
}
void OmniboxViewViews::Update() {
- const ConnectionSecurityHelper::SecurityLevel old_security_level =
- security_level_;
+ const ToolbarModel::SecurityLevel old_security_level = security_level_;
security_level_ = controller()->GetToolbarModel()->GetSecurityLevel(false);
if (model()->UpdatePermanentText()) {
// Something visibly changed. Re-enable URL replacement.
@@ -326,7 +325,7 @@
views::Textfield::OnNativeThemeChanged(theme);
if (location_bar_view_) {
SetBackgroundColor(location_bar_view_->GetColor(
- ConnectionSecurityHelper::NONE, LocationBarView::BACKGROUND));
+ ToolbarModel::NONE, LocationBarView::BACKGROUND));
}
EmphasizeURLComponents();
}
@@ -632,12 +631,10 @@
// may have incorrectly identified a qualifier as a scheme.
SetStyle(gfx::DIAGONAL_STRIKE, false);
if (!model()->user_input_in_progress() && model()->CurrentTextIsURL() &&
- scheme.is_nonempty() &&
- (security_level_ != ConnectionSecurityHelper::NONE)) {
+ scheme.is_nonempty() && (security_level_ != ToolbarModel::NONE)) {
SkColor security_color = location_bar_view_->GetColor(
security_level_, LocationBarView::SECURITY_TEXT);
- const bool strike =
- (security_level_ == ConnectionSecurityHelper::SECURITY_ERROR);
+ const bool strike = (security_level_ == ToolbarModel::SECURITY_ERROR);
const gfx::Range scheme_range(scheme.begin, scheme.end());
ApplyColor(security_color, scheme_range);
ApplyStyle(gfx::DIAGONAL_STRIKE, strike, scheme_range);
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_views.h ('k') | chrome/chrome.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698