| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef COMPONENTS_PROXIMITY_AUTH_MOCK_CRYPTAUTH_CLIENT_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_MOCK_CRYPTAUTH_CLIENT_H |
| 6 #define COMPONENTS_PROXIMITY_AUTH_MOCK_CRYPTAUTH_CLIENT_H | 6 #define COMPONENTS_PROXIMITY_AUTH_MOCK_CRYPTAUTH_CLIENT_H |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
| 10 #include "components/proximity_auth/cryptauth/cryptauth_client.h" | 10 #include "components/cryptauth/cryptauth_client.h" |
| 11 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" | 11 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 | 13 |
| 14 namespace proximity_auth { | 14 namespace cryptauth { |
| 15 | 15 |
| 16 class MockCryptAuthClient : public CryptAuthClient { | 16 class MockCryptAuthClient : public CryptAuthClient { |
| 17 public: | 17 public: |
| 18 MockCryptAuthClient(); | 18 MockCryptAuthClient(); |
| 19 ~MockCryptAuthClient() override; | 19 ~MockCryptAuthClient() override; |
| 20 | 20 |
| 21 // CryptAuthClient: | 21 // CryptAuthClient: |
| 22 MOCK_METHOD3(GetMyDevices, | 22 MOCK_METHOD3(GetMyDevices, |
| 23 void(const cryptauth::GetMyDevicesRequest& request, | 23 void(const cryptauth::GetMyDevicesRequest& request, |
| 24 const GetMyDevicesCallback& callback, | 24 const GetMyDevicesCallback& callback, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 private: | 76 private: |
| 77 // Whether to create StrictMocks or NiceMocks. | 77 // Whether to create StrictMocks or NiceMocks. |
| 78 const MockType mock_type_; | 78 const MockType mock_type_; |
| 79 | 79 |
| 80 // Observers of the factory. | 80 // Observers of the factory. |
| 81 base::ObserverList<Observer> observer_list_; | 81 base::ObserverList<Observer> observer_list_; |
| 82 | 82 |
| 83 DISALLOW_COPY_AND_ASSIGN(MockCryptAuthClientFactory); | 83 DISALLOW_COPY_AND_ASSIGN(MockCryptAuthClientFactory); |
| 84 }; | 84 }; |
| 85 | 85 |
| 86 } // namespace proximity_auth | 86 } // namespace cryptauth |
| 87 | 87 |
| 88 #endif // COMPONENTS_PROXIMITY_AUTH_MOCK_CRYPTAUTH_CLIENT_H | 88 #endif // COMPONENTS_PROXIMITY_AUTH_MOCK_CRYPTAUTH_CLIENT_H |
| OLD | NEW |