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

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

Issue 403933002: Set SSL info when an HTTP auth dialog is triggered by direct navigation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Just use pending navigation entry for everything Created 5 years, 9 months 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/ui/login/login_prompt.cc
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
index 3fce5589817adef556893bab406a0df37424104d..f0db7e050468ded2ecdad20074dc83a3c789c335 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -21,16 +21,20 @@
#include "components/password_manager/core/browser/browser_save_password_progress_logger.h"
#include "components/password_manager/core/browser/password_manager.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#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/common/ssl_status.h"
+#include "grit/generated_resources.h"
#include "net/base/auth.h"
#include "net/base/load_flags.h"
#include "net/base/net_util.h"
#include "net/http/http_transaction_factory.h"
+#include "net/ssl/ssl_info.h"
#include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h"
#include "ui/base/l10n/l10n_util.h"
@@ -555,10 +559,12 @@ void LoginDialogCallback(const GURL& request_url,
request_url,
make_scoped_refptr(auth_info),
make_scoped_refptr(handler));
+ content::NavigationEntry* pending_entry =
Charlie Reis 2015/03/18 17:46:38 Let's put a comment about why it's correct to use
palmer 2015/09/29 00:03:33 I'm following up with this at https://codereview.c
+ parent_contents->GetController().GetPendingEntry();
+ const content::SSLStatus& ssl_status = pending_entry->GetSSL();
// This is owned by the interstitial it creates. It cancels any existing
// interstitial.
- new LoginInterstitialDelegate(parent_contents,
- request_url,
+ new LoginInterstitialDelegate(parent_contents, request_url, ssl_status,
callback);
} else {
ShowLoginPrompt(request_url,

Powered by Google App Engine
This is Rietveld 408576698