OLD | NEW |
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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 if (status.IsError()) | 461 if (status.IsError()) |
462 return Status(kUnknownError, "cannot parse " + it.key(), status); | 462 return Status(kUnknownError, "cannot parse " + it.key(), status); |
463 } | 463 } |
464 return Status(kOk); | 464 return Status(kOk); |
465 } | 465 } |
466 | 466 |
467 } // namespace | 467 } // namespace |
468 | 468 |
469 Switches::Switches() {} | 469 Switches::Switches() {} |
470 | 470 |
| 471 Switches::Switches(const Switches& other) = default; |
| 472 |
471 Switches::~Switches() {} | 473 Switches::~Switches() {} |
472 | 474 |
473 void Switches::SetSwitch(const std::string& name) { | 475 void Switches::SetSwitch(const std::string& name) { |
474 SetSwitch(name, NativeString()); | 476 SetSwitch(name, NativeString()); |
475 } | 477 } |
476 | 478 |
477 void Switches::SetSwitch(const std::string& name, const std::string& value) { | 479 void Switches::SetSwitch(const std::string& name, const std::string& value) { |
478 #if defined(OS_WIN) | 480 #if defined(OS_WIN) |
479 SetSwitch(name, base::UTF8ToUTF16(value)); | 481 SetSwitch(name, base::UTF8ToUTF16(value)); |
480 #else | 482 #else |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 if (iter == logging_prefs.end() || iter->second == Log::kOff) { | 621 if (iter == logging_prefs.end() || iter->second == Log::kOff) { |
620 const base::DictionaryValue* chrome_options = NULL; | 622 const base::DictionaryValue* chrome_options = NULL; |
621 if (desired_caps.GetDictionary("chromeOptions", &chrome_options) && | 623 if (desired_caps.GetDictionary("chromeOptions", &chrome_options) && |
622 chrome_options->HasKey("perfLoggingPrefs")) { | 624 chrome_options->HasKey("perfLoggingPrefs")) { |
623 return Status(kUnknownError, "perfLoggingPrefs specified, " | 625 return Status(kUnknownError, "perfLoggingPrefs specified, " |
624 "but performance logging was not enabled"); | 626 "but performance logging was not enabled"); |
625 } | 627 } |
626 } | 628 } |
627 return Status(kOk); | 629 return Status(kOk); |
628 } | 630 } |
OLD | NEW |