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

Unified Diff: chrome/browser/ui/login/login_handler.cc

Issue 2590183002: Don't force an interstitial when showing a login prompt for a standalone app (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/login/login_handler.cc
diff --git a/chrome/browser/ui/login/login_handler.cc b/chrome/browser/ui/login/login_handler.cc
index 6aa12a65de3ad977bb906ff1cd525960b5ede079..86565bca97f4488fb6986afa54c145c1cd645c57 100644
--- a/chrome/browser/ui/login/login_handler.cc
+++ b/chrome/browser/ui/login/login_handler.cc
@@ -31,6 +31,7 @@
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/web_contents_delegate.h"
#include "content/public/common/origin_util.h"
#include "extensions/features/features.h"
#include "net/base/auth.h"
@@ -596,6 +597,7 @@ void LoginHandler::LoginDialogCallback(const GURL& request_url,
// (a) if the request is cross origin or
// (b) if an interstitial is already being shown or
// (c) the prompt is for proxy authentication
+ // (d) we're not displaying a standalone app
//
// For (a), there are two different ways the navigation can occur:
// 1- The user enters the resource URL in the omnibox.
@@ -622,7 +624,9 @@ void LoginHandler::LoginDialogCallback(const GURL& request_url,
request_url.GetOrigin();
if (is_main_frame &&
(is_cross_origin_request || parent_contents->ShowingInterstitialPage() ||
- auth_info->is_proxy)) {
+ auth_info->is_proxy) &&
+ parent_contents->GetDelegate()->GetDisplayMode(parent_contents) !=
+ blink::WebDisplayModeStandalone) {
RecordHttpAuthPromptType(AUTH_PROMPT_TYPE_WITH_INTERSTITIAL);
// Show a blank interstitial for main-frame, cross origin requests
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698