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

Unified Diff: chrome/browser/android/vr_shell/vr_web_contents_observer.cc

Issue 2562503002: Generalize WebContentsObserver::SecurityStyleChanged (Closed)
Patch Set: Fix nit. Created 4 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/android/vr_shell/vr_web_contents_observer.cc
diff --git a/chrome/browser/android/vr_shell/vr_web_contents_observer.cc b/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
index a21580a6d6070fde398c14ed4faddeda8b26d82c..7171937ddc6ff86e4f930e57ebadda49006585d7 100644
--- a/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
+++ b/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
@@ -22,7 +22,7 @@ VrWebContentsObserver::VrWebContentsObserver(content::WebContents* web_contents,
ui_interface_(ui_interface),
vr_shell_(vr_shell) {
ui_interface_->SetURL(web_contents->GetVisibleURL());
- SetSecurityLevel();
+ DidChangeVisibleSecurityState();
}
VrWebContentsObserver::~VrWebContentsObserver() {}
@@ -60,16 +60,7 @@ void VrWebContentsObserver::DidFinishNavigation(
}
}
-// TODO(cjgrant): We care about security level, not style. Refactor
-// WebContentsObserver (or equivalent) to expose more general security
-// information, so we can stop abusing this callback.
-void VrWebContentsObserver::SecurityStyleChanged(
- blink::WebSecurityStyle security_style,
- const content::SecurityStyleExplanations& explanations) {
- SetSecurityLevel();
-}
-
-void VrWebContentsObserver::SetSecurityLevel() {
+void VrWebContentsObserver::DidChangeVisibleSecurityState() {
const auto* helper = SecurityStateTabHelper::FromWebContents(web_contents());
DCHECK(helper);
security_state::SecurityInfo security_info;

Powered by Google App Engine
This is Rietveld 408576698