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

Unified Diff: chrome/browser/renderer_host/resource_dispatcher_host.cc

Issue 6321013: Stop login prompt from showing for prefetches (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 11 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/renderer_host/resource_dispatcher_host.cc
diff --git a/chrome/browser/renderer_host/resource_dispatcher_host.cc b/chrome/browser/renderer_host/resource_dispatcher_host.cc
index ef9ec9c4e36e8d16eb3f8fdbee50aeda6191b61b..221bca4bc698ef7c6d327bdc936c8f2b7809afed 100644
--- a/chrome/browser/renderer_host/resource_dispatcher_host.cc
+++ b/chrome/browser/renderer_host/resource_dispatcher_host.cc
@@ -1040,6 +1040,10 @@ void ResourceDispatcherHost::OnReceivedRedirect(net::URLRequest* request,
void ResourceDispatcherHost::OnAuthRequired(
net::URLRequest* request,
net::AuthChallengeInfo* auth_info) {
+ if (request->load_flags() & net::LOAD_PREFETCH) {
+ request->CancelAuth();
cbentzel 2011/01/20 17:59:45 Nit: this looks like it was indented one character
gavinp 2011/01/20 18:36:15 Done.
+ return;
+ }
// Create a login dialog on the UI thread to get authentication data,
// or pull from cache and continue on the IO thread.
// TODO(mpcomplete): We should block the parent tab while waiting for

Powered by Google App Engine
This is Rietveld 408576698