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

Unified Diff: chromeos/components/tether/fake_network_configuration_remover.h

Issue 2857853005: [CrOS Tether] Create TetherDisconnector, which disconnects from active tethering sessions. (Closed)
Patch Set: hansberry@ comments. Created 3 years, 8 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
Index: chromeos/components/tether/fake_network_configuration_remover.h
diff --git a/chromeos/components/tether/fake_network_configuration_remover.h b/chromeos/components/tether/fake_network_configuration_remover.h
new file mode 100644
index 0000000000000000000000000000000000000000..a87bbc46c2362e4bcad83b05d0a1683eb5765b13
--- /dev/null
+++ b/chromeos/components/tether/fake_network_configuration_remover.h
@@ -0,0 +1,41 @@
+// Copyright 2017 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 CHROMEOS_COMPONENTS_TETHER_FAKE_NETWORK_CONFIGURATION_REMOVER_H_
+#define CHROMEOS_COMPONENTS_TETHER_FAKE_NETWORK_CONFIGURATION_REMOVER_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "chromeos/components/tether/network_configuration_remover.h"
+
+namespace chromeos {
+
+namespace tether {
+
+// Test double for NetworkConfigurationRemover.
+class FakeNetworkConfigurationRemover : public NetworkConfigurationRemover {
+ public:
+ FakeNetworkConfigurationRemover();
+ ~FakeNetworkConfigurationRemover() override;
+
+ std::string last_removed_wifi_network_guid() {
+ return last_removed_wifi_network_guid_;
+ }
+
+ // NetworkConfigurationRemover:
+ void RemoveNetworkConfiguration(
+ const std::string& wifi_network_guid) override;
+
+ private:
+ std::string last_removed_wifi_network_guid_;
+
+ DISALLOW_COPY_AND_ASSIGN(FakeNetworkConfigurationRemover);
+};
+
+} // namespace tether
+
+} // namespace chromeos
+
+#endif // CHROMEOS_COMPONENTS_TETHER_FAKE_NETWORK_CONFIGURATION_REMOVER_H_

Powered by Google App Engine
This is Rietveld 408576698