OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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 CHROMEOS_DBUS_FAKE_BIOD_AUTH_SESSION_CLIENT_H_ |
| 6 #define CHROMEOS_DBUS_FAKE_BIOD_AUTH_SESSION_CLIENT_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/weak_ptr.h" |
| 10 #include "chromeos/chromeos_export.h" |
| 11 #include "chromeos/dbus/biod_auth_session_client.h" |
| 12 |
| 13 namespace chromeos { |
| 14 |
| 15 class CHROMEOS_EXPORT FakeBiodAuthSessionClient : public BiodAuthSessionClient { |
| 16 public: |
| 17 FakeBiodAuthSessionClient(); |
| 18 ~FakeBiodAuthSessionClient() override; |
| 19 |
| 20 // BiodAuthSessionClient overrides |
| 21 void Init(dbus::Bus* bus) override; |
| 22 void End(const dbus::ObjectPath& auth_session_path) override; |
| 23 |
| 24 private: |
| 25 // Note: This should remain the last member so it'll be destroyed and |
| 26 // invalidate its weak pointers before any other members are destroyed. |
| 27 base::WeakPtrFactory<FakeBiodAuthSessionClient> weak_ptr_factory_; |
| 28 |
| 29 DISALLOW_COPY_AND_ASSIGN(FakeBiodAuthSessionClient); |
| 30 }; |
| 31 |
| 32 } // namespace chromeos |
| 33 |
| 34 #endif // CHROMEOS_DBUS_FAKE_BIOD_AUTH_SESSION_CLIENT_H_ |
OLD | NEW |