| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/commands/session_with_id.h" | 5 #include "chrome/test/webdriver/commands/session_with_id.h" |
| 6 | 6 |
| 7 #include <sstream> | 7 #include <sstream> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/app/chrome_command_ids.h" | 11 #include "chrome/app/chrome_command_ids.h" |
| 12 #include "chrome/common/chrome_constants.h" | 12 #include "chrome/common/chrome_constants.h" |
| 13 #include "chrome/common/chrome_switches.h" | |
| 14 | 13 |
| 15 namespace webdriver { | 14 namespace webdriver { |
| 16 | 15 |
| 17 void SessionWithID::ExecuteGet(Response* const response) { | 16 void SessionWithID::ExecuteGet(Response* const response) { |
| 18 DictionaryValue *temp_value = new DictionaryValue(); | 17 DictionaryValue *temp_value = new DictionaryValue(); |
| 19 | 18 |
| 20 temp_value->SetString(std::string("browserName"), | 19 temp_value->SetString(std::string("browserName"), |
| 21 std::string("chrome")); | 20 std::string("chrome")); |
| 22 temp_value->SetString(std::string("version"), | 21 temp_value->SetString(std::string("version"), |
| 23 std::string(chrome::kChromeVersion)); | 22 std::string(chrome::kChromeVersion)); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 39 response->set_status(kSuccess); | 38 response->set_status(kSuccess); |
| 40 response->set_value(temp_value); | 39 response->set_value(temp_value); |
| 41 } | 40 } |
| 42 | 41 |
| 43 void SessionWithID::ExecuteDelete(Response* const response) { | 42 void SessionWithID::ExecuteDelete(Response* const response) { |
| 44 SessionManager::GetInstance()->Delete(session_->id()); | 43 SessionManager::GetInstance()->Delete(session_->id()); |
| 45 response->set_status(kSuccess); | 44 response->set_status(kSuccess); |
| 46 } | 45 } |
| 47 | 46 |
| 48 } // namespace webdriver | 47 } // namespace webdriver |
| 49 | |
| OLD | NEW |