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

Side by Side Diff: chrome/browser/ui/login/login_prompt.cc

Issue 8340026: Use AuthCredentials throughout the network stack instead of username/password. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix comments Created 9 years, 1 month 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
« no previous file with comments | « chrome/browser/extensions/extension_webrequest_api.cc ('k') | net/base/auth.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/ui/login/login_prompt.h" 5 #include "chrome/browser/ui/login/login_prompt.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 handled_auth_ = true; 353 handled_auth_ = true;
354 return was_handled; 354 return was_handled;
355 } 355 }
356 356
357 // Calls SetAuth from the IO loop. 357 // Calls SetAuth from the IO loop.
358 void LoginHandler::SetAuthDeferred(const string16& username, 358 void LoginHandler::SetAuthDeferred(const string16& username,
359 const string16& password) { 359 const string16& password) {
360 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 360 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
361 361
362 if (request_) { 362 if (request_) {
363 request_->SetAuth(username, password); 363 request_->SetAuth(net::AuthCredentials(username, password));
364 ResetLoginHandlerForRequest(request_); 364 ResetLoginHandlerForRequest(request_);
365 } 365 }
366 } 366 }
367 367
368 // Calls CancelAuth from the IO loop. 368 // Calls CancelAuth from the IO loop.
369 void LoginHandler::CancelAuthDeferred() { 369 void LoginHandler::CancelAuthDeferred() {
370 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); 370 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
371 371
372 if (request_) { 372 if (request_) {
373 request_->CancelAuth(); 373 request_->CancelAuth();
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // Public API 490 // Public API
491 491
492 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, 492 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info,
493 net::URLRequest* request) { 493 net::URLRequest* request) {
494 LoginHandler* handler = LoginHandler::Create(auth_info, request); 494 LoginHandler* handler = LoginHandler::Create(auth_info, request);
495 BrowserThread::PostTask( 495 BrowserThread::PostTask(
496 BrowserThread::UI, FROM_HERE, new LoginDialogTask( 496 BrowserThread::UI, FROM_HERE, new LoginDialogTask(
497 request->url(), auth_info, handler)); 497 request->url(), auth_info, handler));
498 return handler; 498 return handler;
499 } 499 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_webrequest_api.cc ('k') | net/base/auth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698