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/session_manager.h" | 5 #include "chrome/test/webdriver/session_manager.h" |
6 | 6 |
7 #ifdef OS_POSIX | 7 #ifdef OS_POSIX |
8 #include <netdb.h> | 8 #include <netdb.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 #include <arpa/inet.h> | 10 #include <arpa/inet.h> |
(...skipping 165 matching lines...) Loading... |
176 Session* SessionManager::GetSession(const std::string& id) const { | 176 Session* SessionManager::GetSession(const std::string& id) const { |
177 std::map<std::string, Session*>::const_iterator it; | 177 std::map<std::string, Session*>::const_iterator it; |
178 it = map_.find(id); | 178 it = map_.find(id); |
179 if (it == map_.end()) { | 179 if (it == map_.end()) { |
180 VLOG(1) << "No such session with ID " << id; | 180 VLOG(1) << "No such session with ID " << id; |
181 return NULL; | 181 return NULL; |
182 } | 182 } |
183 return it->second; | 183 return it->second; |
184 } | 184 } |
185 | 185 |
| 186 // static |
| 187 SessionManager* SessionManager::GetInstance() { |
| 188 return Singleton<SessionManager>::get(); |
| 189 } |
| 190 |
186 } // namespace webdriver | 191 } // namespace webdriver |
OLD | NEW |