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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_view_views.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/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 814d25bd21adabdb6f327df7d752ecfaf7b5bd6f..19bd981b728c3545172eb3980948842d61963c74 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -143,7 +143,7 @@ OmniboxViewViews::OmniboxViewViews(OmniboxEditController* controller,
make_scoped_ptr(new ChromeOmniboxClient(controller, profile))),
profile_(profile),
popup_window_mode_(popup_window_mode),
- security_level_(SecurityStateModel::NONE),
+ security_level_(security_state::SecurityStateModel::NONE),
saved_selection_for_focus_change_(gfx::Range::InvalidRange()),
ime_composing_before_change_(false),
delete_at_end_pressed_(false),
@@ -228,7 +228,8 @@ void OmniboxViewViews::ResetTabState(content::WebContents* web_contents) {
}
void OmniboxViewViews::Update() {
- const SecurityStateModel::SecurityLevel old_security_level = security_level_;
+ const security_state::SecurityStateModel::SecurityLevel old_security_level =
+ security_level_;
UpdateSecurityLevel();
if (model()->UpdatePermanentText()) {
// Something visibly changed. Re-enable URL replacement.
@@ -648,10 +649,12 @@ void OmniboxViewViews::EmphasizeURLComponents() {
// may have incorrectly identified a qualifier as a scheme.
SetStyle(gfx::DIAGONAL_STRIKE, false);
if (!model()->user_input_in_progress() && text_is_url &&
- scheme.is_nonempty() && (security_level_ != SecurityStateModel::NONE)) {
+ scheme.is_nonempty() &&
+ (security_level_ != security_state::SecurityStateModel::NONE)) {
SkColor security_color =
location_bar_view_->GetSecureTextColor(security_level_);
- const bool strike = (security_level_ == SecurityStateModel::SECURITY_ERROR);
+ const bool strike =
+ (security_level_ == security_state::SecurityStateModel::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/browser/ui/views/toolbar/toolbar_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698