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" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 temp_value->SetString(std::string("platform"), std::string("unknown")); | 48 temp_value->SetString(std::string("platform"), std::string("unknown")); |
49 #endif | 49 #endif |
50 | 50 |
51 temp_value->SetBoolean(std::string("javascriptEnabled"), true); | 51 temp_value->SetBoolean(std::string("javascriptEnabled"), true); |
52 | 52 |
53 response->set_status(kSuccess); | 53 response->set_status(kSuccess); |
54 response->set_value(temp_value); | 54 response->set_value(temp_value); |
55 } | 55 } |
56 | 56 |
57 void SessionWithID::ExecuteDelete(Response* const response) { | 57 void SessionWithID::ExecuteDelete(Response* const response) { |
| 58 // Session manages its own liftime, so do not call delete. |
58 session_->Terminate(); | 59 session_->Terminate(); |
59 SessionManager::GetInstance()->Delete(session_->id()); | |
60 response->set_status(kSuccess); | 60 response->set_status(kSuccess); |
61 } | 61 } |
62 | 62 |
63 bool SessionWithID::RequiresValidTab() { | 63 bool SessionWithID::RequiresValidTab() { |
64 return false; | 64 return false; |
65 } | 65 } |
66 | 66 |
67 } // namespace webdriver | 67 } // namespace webdriver |
OLD | NEW |