| Index: components/wifi_sync/fake_wifi_config_delegate.h
|
| diff --git a/components/wifi_sync/fake_wifi_config_delegate.h b/components/wifi_sync/fake_wifi_config_delegate.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..085ee4e6ec8ded6dbcaae1d6b1b88f7693bea576
|
| --- /dev/null
|
| +++ b/components/wifi_sync/fake_wifi_config_delegate.h
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef COMPONENTS_WIFI_SYNC_FAKE_WIFI_CONFIG_DELEGATE_H_
|
| +#define COMPONENTS_WIFI_SYNC_FAKE_WIFI_CONFIG_DELEGATE_H_
|
| +
|
| +#include "base/macros.h"
|
| +#include "components/wifi_sync/wifi_config_delegate.h"
|
| +
|
| +namespace wifi_sync {
|
| +
|
| +// Fake implementation of WifiConfigDelegate, which provides the
|
| +// ability to check how many times a WifiConfigDelegate method has
|
| +// been called.
|
| +class FakeWifiConfigDelegate : public WifiConfigDelegate {
|
| + public:
|
| + FakeWifiConfigDelegate();
|
| + virtual ~FakeWifiConfigDelegate() {}
|
| +
|
| + // Implementation of WifiConfigDelegate.
|
| + void AddToLocalNetworks(const WifiCredential& network_credential) override;
|
| +
|
| + // Returns the number of times the AddToLocalNetworks method has
|
| + // been called.
|
| + int GetAddCount() const { return add_count_; }
|
| +
|
| + private:
|
| + // The number of times AddToLocalNetworks has been called on this fake.
|
| + int add_count_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(FakeWifiConfigDelegate);
|
| +};
|
| +
|
| +} // namespace wifi_sync
|
| +
|
| +#endif // COMPONENTS_WIFI_SYNC_FAKE_WIFI_CONFIG_DELEGATE_H_
|
|
|