| 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/server/http_handler.h" | 5 #include "chrome/test/chromedriver/server/http_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 callback.Run(Status(kUnknownCommand), scoped_ptr<base::Value>(), session_id); | 54 callback.Run(Status(kUnknownCommand), scoped_ptr<base::Value>(), session_id); |
| 55 } | 55 } |
| 56 | 56 |
| 57 } // namespace | 57 } // namespace |
| 58 | 58 |
| 59 CommandMapping::CommandMapping(HttpMethod method, | 59 CommandMapping::CommandMapping(HttpMethod method, |
| 60 const std::string& path_pattern, | 60 const std::string& path_pattern, |
| 61 const Command& command) | 61 const Command& command) |
| 62 : method(method), path_pattern(path_pattern), command(command) {} | 62 : method(method), path_pattern(path_pattern), command(command) {} |
| 63 | 63 |
| 64 CommandMapping::CommandMapping(const CommandMapping& other) = default; |
| 65 |
| 64 CommandMapping::~CommandMapping() {} | 66 CommandMapping::~CommandMapping() {} |
| 65 | 67 |
| 66 HttpHandler::HttpHandler(const std::string& url_base) | 68 HttpHandler::HttpHandler(const std::string& url_base) |
| 67 : url_base_(url_base), | 69 : url_base_(url_base), |
| 68 received_shutdown_(false), | 70 received_shutdown_(false), |
| 69 command_map_(new CommandMap()), | 71 command_map_(new CommandMap()), |
| 70 weak_ptr_factory_(this) {} | 72 weak_ptr_factory_(this) {} |
| 71 | 73 |
| 72 HttpHandler::HttpHandler( | 74 HttpHandler::HttpHandler( |
| 73 const base::Closure& quit_func, | 75 const base::Closure& quit_func, |
| (...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 778 params.SetString(name, decoded); | 780 params.SetString(name, decoded); |
| 779 } else if (command_path_parts[i] != path_parts[i]) { | 781 } else if (command_path_parts[i] != path_parts[i]) { |
| 780 return false; | 782 return false; |
| 781 } | 783 } |
| 782 } | 784 } |
| 783 out_params->MergeDictionary(¶ms); | 785 out_params->MergeDictionary(¶ms); |
| 784 return true; | 786 return true; |
| 785 } | 787 } |
| 786 | 788 |
| 787 } // namespace internal | 789 } // namespace internal |
| OLD | NEW |