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

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

Issue 2319343004: Makes migration on write error asynchronous to avoid reentrancy issues (Closed)
Patch Set: synced and rebased Created 4 years, 3 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/quic_chromium_client_session.h » ('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
index ee9687c6a8de36cb46e7fabba632edfaabd1b3d7..141e37e0712337d106420f9b04ee7862a3694bc2 100644
--- a/net/quic/chromium/mock_network_change_notifier.cc
+++ b/net/quic/chromium/mock_network_change_notifier.cc
@@ -39,18 +39,28 @@ void MockNetworkChangeNotifier::GetCurrentConnectedNetworks(
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::NotifyNetworkDisconnected(
+void MockNetworkChangeNotifier::QueueNetworkDisconnected(
NetworkChangeNotifier::NetworkHandle network) {
NetworkChangeNotifier::NotifyObserversOfSpecificNetworkChange(
NetworkChangeNotifier::DISCONNECTED, network);
- // Spin the message loop so the notification is delivered.
- base::RunLoop().RunUntilIdle();
}
ScopedMockNetworkChangeNotifier::ScopedMockNetworkChangeNotifier()
« no previous file with comments | « net/quic/chromium/mock_network_change_notifier.h ('k') | net/quic/chromium/quic_chromium_client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698