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

Side by Side Diff: chrome/test/webdriver/webdriver_capabilities_parser.cc

Issue 12601006: Removing base::DictionaryValue::key_iterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial patch. Created 7 years, 9 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/browser/profiles/profile_info_cache.cc ('k') | chrome/test/webdriver/webdriver_util.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) 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/test/webdriver/webdriver_capabilities_parser.h" 5 #include "chrome/test/webdriver/webdriver_capabilities_parser.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/stringprintf.h" 9 #include "base/stringprintf.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 std::set<std::string> proxy_options; 289 std::set<std::string> proxy_options;
290 proxy_options.insert("autodetect"); 290 proxy_options.insert("autodetect");
291 proxy_options.insert("ftpProxy"); 291 proxy_options.insert("ftpProxy");
292 proxy_options.insert("httpProxy"); 292 proxy_options.insert("httpProxy");
293 proxy_options.insert("noProxy"); 293 proxy_options.insert("noProxy");
294 proxy_options.insert("proxyType"); 294 proxy_options.insert("proxyType");
295 proxy_options.insert("proxyAutoconfigUrl"); 295 proxy_options.insert("proxyAutoconfigUrl");
296 proxy_options.insert("sslProxy"); 296 proxy_options.insert("sslProxy");
297 proxy_options.insert("class"); // Created by BeanToJSONConverter. 297 proxy_options.insert("class"); // Created by BeanToJSONConverter.
298 298
299 DictionaryValue::key_iterator key_iter = options->begin_keys(); 299 for (DictionaryValue::Iterator iter(*options); !iter.IsAtEnd();
300 for (; key_iter != options->end_keys(); ++key_iter) { 300 iter.Advance()) {
301 if (proxy_options.find(*key_iter) == proxy_options.end()) { 301 if (proxy_options.find(iter.key()) == proxy_options.end()) {
302 logger_.Log(kInfoLogLevel, "Unrecognized proxy capability: " + *key_iter); 302 logger_.Log(kInfoLogLevel,
303 "Unrecognized proxy capability: " + iter.key());
303 } 304 }
304 } 305 }
305 306
306 typedef Error* (CapabilitiesParser::*Parser)(const DictionaryValue*); 307 typedef Error* (CapabilitiesParser::*Parser)(const DictionaryValue*);
307 std::map<std::string, Parser> proxy_type_parser_map; 308 std::map<std::string, Parser> proxy_type_parser_map;
308 proxy_type_parser_map["autodetect"] = 309 proxy_type_parser_map["autodetect"] =
309 &CapabilitiesParser::ParseProxyAutoDetect; 310 &CapabilitiesParser::ParseProxyAutoDetect;
310 proxy_type_parser_map["pac"] = 311 proxy_type_parser_map["pac"] =
311 &CapabilitiesParser::ParseProxyAutoconfigUrl; 312 &CapabilitiesParser::ParseProxyAutoconfigUrl;
312 proxy_type_parser_map["manual"] = &CapabilitiesParser::ParseProxyServers; 313 proxy_type_parser_map["manual"] = &CapabilitiesParser::ParseProxyServers;
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 if (!switches->GetString(i, &switch_name)) { 444 if (!switches->GetString(i, &switch_name)) {
444 return new Error(kBadRequest, 445 return new Error(kBadRequest,
445 "Each switch to be removed must be a string"); 446 "Each switch to be removed must be a string");
446 } 447 }
447 caps_->exclude_switches.insert(switch_name); 448 caps_->exclude_switches.insert(switch_name);
448 } 449 }
449 return NULL; 450 return NULL;
450 } 451 }
451 452
452 } // namespace webdriver 453 } // namespace webdriver
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_info_cache.cc ('k') | chrome/test/webdriver/webdriver_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698