OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_TEST_CHROMEDRIVER_FAKE_SESSION_ACCESSOR_H_ | |
6 #define CHROME_TEST_CHROMEDRIVER_FAKE_SESSION_ACCESSOR_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "base/compiler_specific.h" | |
10 #include "base/memory/scoped_ptr.h" | |
11 #include "chrome/test/chromedriver/session.h" | |
12 | |
13 namespace base { | |
14 class AutoLock; | |
15 } | |
16 | |
17 // Fake session accessor that doesn't actually lock. | |
18 class FakeSessionAccessor : public SessionAccessor { | |
19 public: | |
20 explicit FakeSessionAccessor(Session* session); | |
21 | |
22 bool IsSessionDeleted() const; | |
23 | |
24 // Overridden from SessionAccessor: | |
25 virtual Session* Access(scoped_ptr<base::AutoLock>* lock) OVERRIDE; | |
26 virtual void DeleteSession() OVERRIDE; | |
27 | |
28 private: | |
29 virtual ~FakeSessionAccessor(); | |
30 | |
31 Session* session_; | |
32 bool is_accessed_; | |
33 bool is_session_deleted_; | |
34 }; | |
35 | |
36 #endif // CHROME_TEST_CHROMEDRIVER_FAKE_SESSION_ACCESSOR_H_ | |
OLD | NEW |