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

Side by Side Diff: content/browser/loader/resource_loader.cc

Issue 786423002: Get rid of net::DO_NOT_PROMPT_FOR_LOGIN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix field init Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/loader/resource_loader.h" 5 #include "content/browser/loader/resource_loader.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/profiler/scoped_tracker.h" 10 #include "base/profiler/scoped_tracker.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 Cancel(); 260 Cancel();
261 } else if (*defer) { 261 } else if (*defer) {
262 deferred_stage_ = DEFERRED_REDIRECT; // Follow redirect when resumed. 262 deferred_stage_ = DEFERRED_REDIRECT; // Follow redirect when resumed.
263 } 263 }
264 } 264 }
265 265
266 void ResourceLoader::OnAuthRequired(net::URLRequest* unused, 266 void ResourceLoader::OnAuthRequired(net::URLRequest* unused,
267 net::AuthChallengeInfo* auth_info) { 267 net::AuthChallengeInfo* auth_info) {
268 DCHECK_EQ(request_.get(), unused); 268 DCHECK_EQ(request_.get(), unused);
269 269
270 if (request_->load_flags() & net::LOAD_DO_NOT_PROMPT_FOR_LOGIN) { 270 ResourceRequestInfoImpl* info = GetRequestInfo();
271 if (info->do_not_prompt_for_login()) {
271 request_->CancelAuth(); 272 request_->CancelAuth();
272 return; 273 return;
273 } 274 }
274 275
275 // Create a login dialog on the UI thread to get authentication data, or pull 276 // Create a login dialog on the UI thread to get authentication data, or pull
276 // from cache and continue on the IO thread. 277 // from cache and continue on the IO thread.
277 278
278 DCHECK(!login_delegate_.get()) 279 DCHECK(!login_delegate_.get())
279 << "OnAuthRequired called with login_delegate pending"; 280 << "OnAuthRequired called with login_delegate pending";
280 login_delegate_ = delegate_->CreateLoginDelegate(this, auth_info); 281 login_delegate_ = delegate_->CreateLoginDelegate(this, auth_info);
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 case net::URLRequestStatus::FAILED: 814 case net::URLRequestStatus::FAILED:
814 status = STATUS_UNDEFINED; 815 status = STATUS_UNDEFINED;
815 break; 816 break;
816 } 817 }
817 818
818 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX); 819 UMA_HISTOGRAM_ENUMERATION("Net.Prefetch.Pattern", status, STATUS_MAX);
819 } 820 }
820 } 821 }
821 822
822 } // namespace content 823 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698