OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_WIFI_SYNC_FAKE_WIFI_CONFIG_DELEGATE_H_ |
| 6 #define COMPONENTS_WIFI_SYNC_FAKE_WIFI_CONFIG_DELEGATE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "components/wifi_sync/wifi_config_delegate.h" |
| 10 |
| 11 namespace wifi_sync { |
| 12 |
| 13 // Fake implementation of WifiConfigDelegate, which provides the |
| 14 // ability to check how many times a WifiConfigDelegate method has |
| 15 // been called. |
| 16 class FakeWifiConfigDelegate : public WifiConfigDelegate { |
| 17 public: |
| 18 FakeWifiConfigDelegate(); |
| 19 virtual ~FakeWifiConfigDelegate() {} |
| 20 |
| 21 // Implementation of WifiConfigDelegate. |
| 22 void AddToLocalNetworks(const WifiCredential& network_credential) override; |
| 23 |
| 24 // Returns the number of times the AddToLocalNetworks method has |
| 25 // been called. |
| 26 int GetAddCount() const { return add_count_; } |
| 27 |
| 28 private: |
| 29 // The number of times AddToLocalNetworks has been called on this fake. |
| 30 int add_count_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(FakeWifiConfigDelegate); |
| 33 }; |
| 34 |
| 35 } // namespace wifi_sync |
| 36 |
| 37 #endif // COMPONENTS_WIFI_SYNC_FAKE_WIFI_CONFIG_DELEGATE_H_ |
OLD | NEW |