1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // This file contains utility functions to wait for network state. 6 7 #ifndef CHROME_BROWSER_CHROMEOS_NET_DELAY_NETWORK_CALL_H_ 8 #define CHROME_BROWSER_CHROMEOS_NET_DELAY_NETWORK_CALL_H_ 9 10 #include "base/callback_forward.h" 11 12 namespace base { 13 14 class TimeDelta; 15 16 } // namespace base 17 18 namespace chromeos { 19 20 // Default delay to be used as an argument to DelayNetworkCall(). 21 extern const unsigned kDefaultNetworkRetryDelayMS; 22 23 // Delay callback until the network is connected or while on a captive portal. 24 void DelayNetworkCall(base::TimeDelta retry, base::OnceClosure callback); 25 26 } // namespace chromeos 27 28 #endif // CHROME_BROWSER_CHROMEOS_NET_DELAY_NETWORK_CALL_H_ 29