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..5573ad0e572a770606297ae8d289aa081296ea8c 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" |
| @@ -50,9 +56,16 @@ class LoginHandlerAndroid : public LoginHandler { |
| ViewAndroidHelper* view_helper = ViewAndroidHelper::FromWebContents( |
| web_contents); |
| +#if BUILDFLAG(ENABLE_VR) |
| + if (vr_shell::VrTabHelper::IsInVr(web_contents)) { |
| + CancelAuth(); |
| + return; |
| + } |
| +#endif |
| + |
| // Notify WindowAndroid that HTTP authentication is required. |
| - if (view_helper->GetViewAndroid() |
| - && view_helper->GetViewAndroid()->GetWindowAndroid()) { |
| + if (view_helper->GetViewAndroid() && |
| + view_helper->GetViewAndroid()->GetWindowAndroid()) { |
| chrome_http_auth_handler_.reset( |
| new ChromeHttpAuthHandler(authority, explanation)); |
| chrome_http_auth_handler_->Init(); |
| @@ -70,7 +83,7 @@ class LoginHandlerAndroid : public LoginHandler { |
| } else { |
| CancelAuth(); |
| LOG(WARNING) << "HTTP Authentication failed because TabAndroid is " |
| - "missing"; |
| + "missing"; |
|
billorr
2017/05/24 18:00:42
oops - I'll revert this whitespace change.
|
| } |
| } |