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

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

Issue 3040016: Net: Convert username and password to string16. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: address comments Created 10 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/login_prompt.h" 5 #include "chrome/browser/login_prompt.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 handled_auth_ = true; 312 handled_auth_ = true;
313 return was_handled; 313 return was_handled;
314 } 314 }
315 315
316 // Calls SetAuth from the IO loop. 316 // Calls SetAuth from the IO loop.
317 void LoginHandler::SetAuthDeferred(const std::wstring& username, 317 void LoginHandler::SetAuthDeferred(const std::wstring& username,
318 const std::wstring& password) { 318 const std::wstring& password) {
319 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 319 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
320 320
321 if (request_) { 321 if (request_) {
322 request_->SetAuth(username, password); 322 request_->SetAuth(WideToUTF16Hack(username), WideToUTF16Hack(password));
323 ResetLoginHandlerForRequest(request_); 323 ResetLoginHandlerForRequest(request_);
324 } 324 }
325 } 325 }
326 326
327 // Calls CancelAuth from the IO loop. 327 // Calls CancelAuth from the IO loop.
328 void LoginHandler::CancelAuthDeferred() { 328 void LoginHandler::CancelAuthDeferred() {
329 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); 329 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO));
330 330
331 if (request_) { 331 if (request_) {
332 request_->CancelAuth(); 332 request_->CancelAuth();
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 // Public API 435 // Public API
436 436
437 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info, 437 LoginHandler* CreateLoginPrompt(net::AuthChallengeInfo* auth_info,
438 URLRequest* request) { 438 URLRequest* request) {
439 LoginHandler* handler = LoginHandler::Create(auth_info, request); 439 LoginHandler* handler = LoginHandler::Create(auth_info, request);
440 ChromeThread::PostTask( 440 ChromeThread::PostTask(
441 ChromeThread::UI, FROM_HERE, new LoginDialogTask( 441 ChromeThread::UI, FROM_HERE, new LoginDialogTask(
442 request->url(), auth_info, handler)); 442 request->url(), auth_info, handler));
443 return handler; 443 return handler;
444 } 444 }
OLDNEW
« no previous file with comments | « no previous file | net/base/auth.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698