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

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

Issue 1172753003: Move LowerCaseEqualsASCII to base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@string_util
Patch Set: Created 5 years, 6 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
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 "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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 } 425 }
426 426
427 // Helper to create a PasswordForm and stuff it into a vector as input 427 // Helper to create a PasswordForm and stuff it into a vector as input
428 // for PasswordManager::PasswordFormsParsed, the hook into PasswordManager. 428 // for PasswordManager::PasswordFormsParsed, the hook into PasswordManager.
429 void MakeInputForPasswordManager( 429 void MakeInputForPasswordManager(
430 const GURL& request_url, 430 const GURL& request_url,
431 net::AuthChallengeInfo* auth_info, 431 net::AuthChallengeInfo* auth_info,
432 LoginHandler* handler, 432 LoginHandler* handler,
433 std::vector<PasswordForm>* password_manager_input) { 433 std::vector<PasswordForm>* password_manager_input) {
434 PasswordForm dialog_form; 434 PasswordForm dialog_form;
435 if (LowerCaseEqualsASCII(auth_info->scheme, "basic")) { 435 if (base::LowerCaseEqualsASCII(auth_info->scheme, "basic")) {
436 dialog_form.scheme = PasswordForm::SCHEME_BASIC; 436 dialog_form.scheme = PasswordForm::SCHEME_BASIC;
437 } else if (LowerCaseEqualsASCII(auth_info->scheme, "digest")) { 437 } else if (base::LowerCaseEqualsASCII(auth_info->scheme, "digest")) {
438 dialog_form.scheme = PasswordForm::SCHEME_DIGEST; 438 dialog_form.scheme = PasswordForm::SCHEME_DIGEST;
439 } else { 439 } else {
440 dialog_form.scheme = PasswordForm::SCHEME_OTHER; 440 dialog_form.scheme = PasswordForm::SCHEME_OTHER;
441 } 441 }
442 std::string host_and_port(auth_info->challenger.ToString()); 442 std::string host_and_port(auth_info->challenger.ToString());
443 if (auth_info->is_proxy) { 443 if (auth_info->is_proxy) {
444 std::string origin = host_and_port; 444 std::string origin = host_and_port;
445 // We don't expect this to already start with http:// or https://. 445 // We don't expect this to already start with http:// or https://.
446 DCHECK(origin.find("http://") != 0 && origin.find("https://") != 0); 446 DCHECK(origin.find("http://") != 0 && origin.find("https://") != 0);
447 origin = std::string("http://") + origin; 447 origin = std::string("http://") + origin;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 net::URLRequest* request) { 586 net::URLRequest* request) {
587 bool is_main_frame = (request->load_flags() & net::LOAD_MAIN_FRAME) != 0; 587 bool is_main_frame = (request->load_flags() & net::LOAD_MAIN_FRAME) != 0;
588 LoginHandler* handler = LoginHandler::Create(auth_info, request); 588 LoginHandler* handler = LoginHandler::Create(auth_info, request);
589 BrowserThread::PostTask( 589 BrowserThread::PostTask(
590 BrowserThread::UI, FROM_HERE, 590 BrowserThread::UI, FROM_HERE,
591 base::Bind(&LoginDialogCallback, request->url(), 591 base::Bind(&LoginDialogCallback, request->url(),
592 make_scoped_refptr(auth_info), make_scoped_refptr(handler), 592 make_scoped_refptr(auth_info), make_scoped_refptr(handler),
593 is_main_frame)); 593 is_main_frame));
594 return handler; 594 return handler;
595 } 595 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc ('k') | chrome/browser/ui/views/keyboard_access_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698