Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: components/wifi_sync/fake_wifi_config_delegate.h

Issue 849693002: wifi_sync: add FakeWifiConfigDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@submit-4.2-wifi-config-delegate
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/wifi_sync/BUILD.gn ('k') | components/wifi_sync/fake_wifi_config_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..b54493be6878aa933ce6098880ba5a00fe0c5c76
--- /dev/null
+++ b/components/wifi_sync/fake_wifi_config_delegate.h
@@ -0,0 +1,37 @@
+// Copyright 2015 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_
« no previous file with comments | « components/wifi_sync/BUILD.gn ('k') | components/wifi_sync/fake_wifi_config_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698