Suppression for crbug/241044.
[chromium-blink-merge.git] / chrome / test / chromedriver / fake_session_accessor.h
blobb9b52753ee950e350e8142108d463a0acc5cd871
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.
5 #ifndef CHROME_TEST_CHROMEDRIVER_FAKE_SESSION_ACCESSOR_H_
6 #define CHROME_TEST_CHROMEDRIVER_FAKE_SESSION_ACCESSOR_H_
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"
13 namespace base {
14 class AutoLock;
17 // Fake session accessor that doesn't actually lock.
18 class FakeSessionAccessor : public SessionAccessor {
19 public:
20 explicit FakeSessionAccessor(Session* session);
22 bool IsSessionDeleted() const;
24 // Overridden from SessionAccessor:
25 virtual Session* Access(scoped_ptr<base::AutoLock>* lock) OVERRIDE;
26 virtual void DeleteSession() OVERRIDE;
28 private:
29 virtual ~FakeSessionAccessor();
31 Session* session_;
32 bool is_accessed_;
33 bool is_session_deleted_;
36 #endif // CHROME_TEST_CHROMEDRIVER_FAKE_SESSION_ACCESSOR_H_