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" |
11 #include "base/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "base/values.h" | 13 #include "base/values.h" |
14 #include "chrome/test/chromedriver/chrome/status.h" | 14 #include "chrome/test/chromedriver/chrome/status.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 typedef base::Callback<Status(const base::Value&, Capabilities*)> Parser; | 18 typedef base::Callback<Status(const base::Value&, Capabilities*)> Parser; |
19 | 19 |
20 Status ParseDetach( | 20 Status ParseDetach( |
21 const base::Value& option, | 21 const base::Value& option, |
22 Capabilities* capabilities) { | 22 Capabilities* capabilities) { |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 it != parser_map.end(); ++it) { | 267 it != parser_map.end(); ++it) { |
268 const base::Value* capability = NULL; | 268 const base::Value* capability = NULL; |
269 if (desired_caps.Get(it->first, &capability)) { | 269 if (desired_caps.Get(it->first, &capability)) { |
270 status = it->second.Run(*capability, this); | 270 status = it->second.Run(*capability, this); |
271 if (status.IsError()) | 271 if (status.IsError()) |
272 return status; | 272 return status; |
273 } | 273 } |
274 } | 274 } |
275 return Status(kOk); | 275 return Status(kOk); |
276 } | 276 } |
OLD | NEW |