OLD | NEW |
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_dispatch.h" | 5 #include "chrome/test/webdriver/webdriver_dispatch.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 chrome::VersionInfo version_info; | 113 chrome::VersionInfo version_info; |
114 DictionaryValue* build_info = new DictionaryValue; | 114 DictionaryValue* build_info = new DictionaryValue; |
115 build_info->SetString("time", | 115 build_info->SetString("time", |
116 base::StringPrintf("%s %s PST", __DATE__, __TIME__)); | 116 base::StringPrintf("%s %s PST", __DATE__, __TIME__)); |
117 build_info->SetString("version", version_info.Version()); | 117 build_info->SetString("version", version_info.Version()); |
118 build_info->SetString("revision", version_info.LastChange()); | 118 build_info->SetString("revision", version_info.LastChange()); |
119 | 119 |
120 DictionaryValue* os_info = new DictionaryValue; | 120 DictionaryValue* os_info = new DictionaryValue; |
121 os_info->SetString("name", base::SysInfo::OperatingSystemName()); | 121 os_info->SetString("name", base::SysInfo::OperatingSystemName()); |
122 os_info->SetString("version", base::SysInfo::OperatingSystemVersion()); | 122 os_info->SetString("version", base::SysInfo::OperatingSystemVersion()); |
123 os_info->SetString("arch", base::SysInfo::CPUArchitecture()); | 123 os_info->SetString("arch", base::SysInfo::OperatingSystemArchitecture()); |
124 | 124 |
125 DictionaryValue* status = new DictionaryValue; | 125 DictionaryValue* status = new DictionaryValue; |
126 status->Set("build", build_info); | 126 status->Set("build", build_info); |
127 status->Set("os", os_info); | 127 status->Set("os", os_info); |
128 | 128 |
129 Response response; | 129 Response response; |
130 response.SetStatus(kSuccess); | 130 response.SetStatus(kSuccess); |
131 response.SetValue(status); // Assumes ownership of |status|. | 131 response.SetValue(status); // Assumes ownership of |status|. |
132 | 132 |
133 internal::SendResponse(connection, | 133 internal::SendResponse(connection, |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 ++callback) { | 397 ++callback) { |
398 if (MatchPattern(request_info->uri, callback->uri_regex_)) { | 398 if (MatchPattern(request_info->uri, callback->uri_regex_)) { |
399 callback->func_(connection, request_info, callback->user_data_); | 399 callback->func_(connection, request_info, callback->user_data_); |
400 return true; | 400 return true; |
401 } | 401 } |
402 } | 402 } |
403 return false; | 403 return false; |
404 } | 404 } |
405 | 405 |
406 } // namespace webdriver | 406 } // namespace webdriver |
OLD | NEW |