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

Side by Side Diff: chrome/test/chromedriver/capabilities.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
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/capabilities.h" 5 #include "chrome/test/chromedriver/capabilities.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 return Status(kOk); 178 return Status(kOk);
179 } 179 }
180 180
181 Status ParseProxy(const base::Value& option, Capabilities* capabilities) { 181 Status ParseProxy(const base::Value& option, Capabilities* capabilities) {
182 const base::DictionaryValue* proxy_dict; 182 const base::DictionaryValue* proxy_dict;
183 if (!option.GetAsDictionary(&proxy_dict)) 183 if (!option.GetAsDictionary(&proxy_dict))
184 return Status(kUnknownError, "must be a dictionary"); 184 return Status(kUnknownError, "must be a dictionary");
185 std::string proxy_type; 185 std::string proxy_type;
186 if (!proxy_dict->GetString("proxyType", &proxy_type)) 186 if (!proxy_dict->GetString("proxyType", &proxy_type))
187 return Status(kUnknownError, "'proxyType' must be a string"); 187 return Status(kUnknownError, "'proxyType' must be a string");
188 proxy_type = StringToLowerASCII(proxy_type); 188 proxy_type = base::StringToLowerASCII(proxy_type);
189 if (proxy_type == "direct") { 189 if (proxy_type == "direct") {
190 capabilities->switches.SetSwitch("no-proxy-server"); 190 capabilities->switches.SetSwitch("no-proxy-server");
191 } else if (proxy_type == "system") { 191 } else if (proxy_type == "system") {
192 // Chrome default. 192 // Chrome default.
193 } else if (proxy_type == "pac") { 193 } else if (proxy_type == "pac") {
194 CommandLine::StringType proxy_pac_url; 194 CommandLine::StringType proxy_pac_url;
195 if (!proxy_dict->GetString("proxyAutoconfigUrl", &proxy_pac_url)) 195 if (!proxy_dict->GetString("proxyAutoconfigUrl", &proxy_pac_url))
196 return Status(kUnknownError, "'proxyAutoconfigUrl' must be a string"); 196 return Status(kUnknownError, "'proxyAutoconfigUrl' must be a string");
197 capabilities->switches.SetSwitch("proxy-pac-url", proxy_pac_url); 197 capabilities->switches.SetSwitch("proxy-pac-url", proxy_pac_url);
198 } else if (proxy_type == "autodetect") { 198 } else if (proxy_type == "autodetect") {
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if (iter == logging_prefs.end() || iter->second == Log::kOff) { 563 if (iter == logging_prefs.end() || iter->second == Log::kOff) {
564 const base::DictionaryValue* chrome_options = NULL; 564 const base::DictionaryValue* chrome_options = NULL;
565 if (desired_caps.GetDictionary("chromeOptions", &chrome_options) && 565 if (desired_caps.GetDictionary("chromeOptions", &chrome_options) &&
566 chrome_options->HasKey("perfLoggingPrefs")) { 566 chrome_options->HasKey("perfLoggingPrefs")) {
567 return Status(kUnknownError, "perfLoggingPrefs specified, " 567 return Status(kUnknownError, "perfLoggingPrefs specified, "
568 "but performance logging was not enabled"); 568 "but performance logging was not enabled");
569 } 569 }
570 } 570 }
571 return Status(kOk); 571 return Status(kOk);
572 } 572 }
OLDNEW
« no previous file with comments | « chrome/renderer/safe_browsing/phishing_dom_feature_extractor.cc ('k') | chrome/test/chromedriver/chrome_launcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698