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

Side by Side Diff: chrome/test/chromedriver/server/http_handler.cc

Issue 448853002: Move StringToLowerASCII to base namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | « chrome/test/chromedriver/chrome_launcher.cc ('k') | chromeos/cryptohome/system_salt_getter.cc » ('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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/test/chromedriver/server/http_handler.h" 5 #include "chrome/test/chromedriver/server/http_handler.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/json/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 new net::HttpServerResponseInfo(net::HTTP_OK)); 687 new net::HttpServerResponseInfo(net::HTTP_OK));
688 response->SetBody(body, "application/json; charset=utf-8"); 688 response->SetBody(body, "application/json; charset=utf-8");
689 return response.Pass(); 689 return response.Pass();
690 } 690 }
691 691
692 namespace internal { 692 namespace internal {
693 693
694 const char kNewSessionPathPattern[] = "session"; 694 const char kNewSessionPathPattern[] = "session";
695 695
696 bool MatchesMethod(HttpMethod command_method, const std::string& method) { 696 bool MatchesMethod(HttpMethod command_method, const std::string& method) {
697 std::string lower_method = StringToLowerASCII(method); 697 std::string lower_method = base::StringToLowerASCII(method);
698 switch (command_method) { 698 switch (command_method) {
699 case kGet: 699 case kGet:
700 return lower_method == "get"; 700 return lower_method == "get";
701 case kPost: 701 case kPost:
702 return lower_method == "post" || lower_method == "put"; 702 return lower_method == "post" || lower_method == "put";
703 case kDelete: 703 case kDelete:
704 return lower_method == "delete"; 704 return lower_method == "delete";
705 } 705 }
706 return false; 706 return false;
707 } 707 }
(...skipping 26 matching lines...) Expand all
734 params.SetString(name, path_parts[i]); 734 params.SetString(name, path_parts[i]);
735 } else if (command_path_parts[i] != path_parts[i]) { 735 } else if (command_path_parts[i] != path_parts[i]) {
736 return false; 736 return false;
737 } 737 }
738 } 738 }
739 out_params->MergeDictionary(&params); 739 out_params->MergeDictionary(&params);
740 return true; 740 return true;
741 } 741 }
742 742
743 } // namespace internal 743 } // namespace internal
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/chrome_launcher.cc ('k') | chromeos/cryptohome/system_salt_getter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698