| 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 da533a9f0be0f41361c031f8f5db988bb5bc72d8..a21580a6d6070fde398c14ed4faddeda8b26d82c 100644
|
| --- a/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
|
| +++ b/chrome/browser/android/vr_shell/vr_web_contents_observer.cc
|
| @@ -43,7 +43,6 @@ void VrWebContentsObserver::DidStartNavigation(
|
| content::NavigationHandle* navigation_handle) {
|
| if (navigation_handle->IsInMainFrame()) {
|
| ui_interface_->SetURL(navigation_handle->GetURL());
|
| - SetSecurityLevel();
|
| }
|
| }
|
|
|
| @@ -51,7 +50,6 @@ void VrWebContentsObserver::DidRedirectNavigation(
|
| content::NavigationHandle* navigation_handle) {
|
| if (navigation_handle->IsInMainFrame()) {
|
| ui_interface_->SetURL(navigation_handle->GetURL());
|
| - SetSecurityLevel();
|
| }
|
| }
|
|
|
| @@ -59,10 +57,18 @@ void VrWebContentsObserver::DidFinishNavigation(
|
| content::NavigationHandle* navigation_handle) {
|
| if (navigation_handle->IsInMainFrame()) {
|
| ui_interface_->SetURL(navigation_handle->GetURL());
|
| - SetSecurityLevel();
|
| }
|
| }
|
|
|
| +// 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() {
|
| const auto* helper = SecurityStateTabHelper::FromWebContents(web_contents());
|
| DCHECK(helper);
|
|
|