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

Unified Diff: net/quic/chromium/mock_network_change_notifier.cc

Issue 2811183003: Change Cronet's "disable_ipv6" to "disable_ipv6_on_wifi" (Closed)
Patch Set: more 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
« no previous file with comments | « net/quic/chromium/mock_network_change_notifier.h ('k') | net/quic/chromium/network_connection_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/chromium/mock_network_change_notifier.cc
diff --git a/net/quic/chromium/mock_network_change_notifier.cc b/net/quic/chromium/mock_network_change_notifier.cc
deleted file mode 100644
index 86326e2107dc23e18824e74e4f129eef34fd3d8e..0000000000000000000000000000000000000000
--- a/net/quic/chromium/mock_network_change_notifier.cc
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "net/quic/chromium/mock_network_change_notifier.h"
-
-#include "base/run_loop.h"
-
-namespace net {
-namespace test {
-
-MockNetworkChangeNotifier::MockNetworkChangeNotifier()
- : force_network_handles_supported_(false),
- connection_type_(CONNECTION_UNKNOWN) {}
-MockNetworkChangeNotifier::~MockNetworkChangeNotifier() {}
-
-MockNetworkChangeNotifier::ConnectionType
-MockNetworkChangeNotifier::GetCurrentConnectionType() const {
- return connection_type_;
-}
-
-void MockNetworkChangeNotifier::ForceNetworkHandlesSupported() {
- force_network_handles_supported_ = true;
-}
-
-bool MockNetworkChangeNotifier::AreNetworkHandlesCurrentlySupported() const {
- return force_network_handles_supported_;
-}
-
-void MockNetworkChangeNotifier::SetConnectedNetworksList(
- const NetworkList& network_list) {
- connected_networks_ = network_list;
-}
-
-void MockNetworkChangeNotifier::GetCurrentConnectedNetworks(
- NetworkList* network_list) const {
- network_list->clear();
- *network_list = connected_networks_;
-}
-
-void MockNetworkChangeNotifier::NotifyNetworkMadeDefault(
- NetworkChangeNotifier::NetworkHandle network) {
- QueueNetworkMadeDefault(network);
- // Spin the message loop so the notification is delivered.
- base::RunLoop().RunUntilIdle();
-}
-
-void MockNetworkChangeNotifier::QueueNetworkMadeDefault(
- NetworkChangeNotifier::NetworkHandle network) {
- NetworkChangeNotifier::NotifyObserversOfSpecificNetworkChange(
- NetworkChangeNotifier::MADE_DEFAULT, network);
-}
-
-void MockNetworkChangeNotifier::NotifyNetworkDisconnected(
- NetworkChangeNotifier::NetworkHandle network) {
- QueueNetworkDisconnected(network);
- // Spin the message loop so the notification is delivered.
- base::RunLoop().RunUntilIdle();
-}
-
-void MockNetworkChangeNotifier::QueueNetworkDisconnected(
- NetworkChangeNotifier::NetworkHandle network) {
- NetworkChangeNotifier::NotifyObserversOfSpecificNetworkChange(
- NetworkChangeNotifier::DISCONNECTED, network);
-}
-
-void MockNetworkChangeNotifier::NotifyNetworkConnected(
- NetworkChangeNotifier::NetworkHandle network) {
- NetworkChangeNotifier::NotifyObserversOfSpecificNetworkChange(
- NetworkChangeNotifier::CONNECTED, network);
- // Spin the message loop so the notification is delivered.
- base::RunLoop().RunUntilIdle();
-}
-
-ScopedMockNetworkChangeNotifier::ScopedMockNetworkChangeNotifier()
- : disable_network_change_notifier_for_tests_(
- new NetworkChangeNotifier::DisableForTest()),
- mock_network_change_notifier_(new MockNetworkChangeNotifier()) {}
-
-ScopedMockNetworkChangeNotifier::~ScopedMockNetworkChangeNotifier() {}
-
-MockNetworkChangeNotifier*
-ScopedMockNetworkChangeNotifier::mock_network_change_notifier() {
- return mock_network_change_notifier_.get();
-}
-
-} // namespace test
-} // namespace net
« no previous file with comments | « net/quic/chromium/mock_network_change_notifier.h ('k') | net/quic/chromium/network_connection_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698