| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/session_manager.h" | 5 #include "chrome/test/webdriver/session_manager.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/process.h" | 9 #include "base/process.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| 11 #include "base/ref_counted.h" | 11 #include "base/ref_counted.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 std::map<std::string, Session*>::const_iterator it; | 170 std::map<std::string, Session*>::const_iterator it; |
| 171 base::AutoLock lock(map_lock_); | 171 base::AutoLock lock(map_lock_); |
| 172 it = map_.find(id); | 172 it = map_.find(id); |
| 173 if (it == map_.end()) { | 173 if (it == map_.end()) { |
| 174 VLOG(1) << "No such session with ID " << id; | 174 VLOG(1) << "No such session with ID " << id; |
| 175 return NULL; | 175 return NULL; |
| 176 } | 176 } |
| 177 return it->second; | 177 return it->second; |
| 178 } | 178 } |
| 179 | 179 |
| 180 SessionManager::SessionManager() : addr_(""), port_(""), count_(0) {} |
| 181 |
| 182 SessionManager::~SessionManager() {} |
| 183 |
| 180 // static | 184 // static |
| 181 SessionManager* SessionManager::GetInstance() { | 185 SessionManager* SessionManager::GetInstance() { |
| 182 return Singleton<SessionManager>::get(); | 186 return Singleton<SessionManager>::get(); |
| 183 } | 187 } |
| 184 | 188 |
| 185 } // namespace webdriver | 189 } // namespace webdriver |
| OLD | NEW |