Chromium Code Reviews| Index: chrome/browser/ui/android/login_handler_android.cc |
| diff --git a/chrome/browser/ui/android/login_handler_android.cc b/chrome/browser/ui/android/login_handler_android.cc |
| index 4c0db8a326856858a84c4d0bed64bf4c6014fbdc..a5caced60a84f74667120d65f57658b6fd6c50f3 100644 |
| --- a/chrome/browser/ui/android/login_handler_android.cc |
| +++ b/chrome/browser/ui/android/login_handler_android.cc |
| @@ -9,6 +9,12 @@ |
| #include "base/logging.h" |
| #include "base/strings/string16.h" |
| #include "base/strings/utf_string_conversions.h" |
| + |
| +#include "device/vr/features/features.h" |
| +#if BUILDFLAG(ENABLE_VR) |
| +#include "chrome/browser/android/vr_shell/vr_tab_helper.h" |
| +#endif // BUILDFLAG(ENABLE_VR) |
| + |
| #include "chrome/browser/ui/android/chrome_http_auth_handler.h" |
| #include "chrome/browser/ui/android/view_android_helper.h" |
| #include "content/public/browser/browser_thread.h" |
| @@ -51,8 +57,12 @@ class LoginHandlerAndroid : public LoginHandler { |
| web_contents); |
| // Notify WindowAndroid that HTTP authentication is required. |
| - if (view_helper->GetViewAndroid() |
| - && view_helper->GetViewAndroid()->GetWindowAndroid()) { |
| + if (view_helper->GetViewAndroid() && |
| + view_helper->GetViewAndroid()->GetWindowAndroid() |
| +#if BUILDFLAG(ENABLE_VR) |
|
Ted C
2017/05/24 17:40:44
just for readability, I'd be tempted to pull this
billorr
2017/05/24 18:00:42
Done.
|
| + && !vr_shell::VrTabHelper::IsInVr(web_contents) |
| +#endif |
| + ) { |
| chrome_http_auth_handler_.reset( |
| new ChromeHttpAuthHandler(authority, explanation)); |
| chrome_http_auth_handler_->Init(); |
| @@ -69,8 +79,12 @@ class LoginHandlerAndroid : public LoginHandler { |
| NotifyAuthNeeded(); |
| } else { |
| CancelAuth(); |
| - LOG(WARNING) << "HTTP Authentication failed because TabAndroid is " |
| - "missing"; |
| +#if BUILDFLAG(ENABLE_VR) |
| + // Only LOG(WARNING) if we aren't in VR |
| + if (!vr_shell::VrTabHelper::IsInVr(web_contents)) |
| +#endif |
| + LOG(WARNING) << "HTTP Authentication failed because TabAndroid is " |
| + "missing"; |
| } |
| } |