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

Side by Side Diff: net/base/network_change_notifier.h

Issue 11464028: Introduce ERR_NETWORK_CHANGED and allow URLFetcher to automatically retry on that error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed nits Created 8 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/base/net_error_list.h ('k') | net/http/http_network_session.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 5 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 6 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/observer_list_threadsafe.h" 9 #include "base/observer_list_threadsafe.h"
10 #include "base/time.h" 10 #include "base/time.h"
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 static void NotifyObserversOfNetworkChange(ConnectionType type); 267 static void NotifyObserversOfNetworkChange(ConnectionType type);
268 268
269 // Stores |config| in NetworkState and notifies observers. 269 // Stores |config| in NetworkState and notifies observers.
270 static void SetDnsConfig(const DnsConfig& config); 270 static void SetDnsConfig(const DnsConfig& config);
271 271
272 private: 272 private:
273 friend class HostResolverImplDnsTest; 273 friend class HostResolverImplDnsTest;
274 friend class NetworkChangeNotifierAndroidTest; 274 friend class NetworkChangeNotifierAndroidTest;
275 friend class NetworkChangeNotifierLinuxTest; 275 friend class NetworkChangeNotifierLinuxTest;
276 friend class NetworkChangeNotifierWinTest; 276 friend class NetworkChangeNotifierWinTest;
277 friend class URLFetcherMockDnsTest;
277 278
278 class NetworkState; 279 class NetworkState;
279 class NetworkChangeCalculator; 280 class NetworkChangeCalculator;
280 281
281 // Allows a second NetworkChangeNotifier to be created for unit testing, so 282 // Allows a second NetworkChangeNotifier to be created for unit testing, so
282 // the test suite can create a MockNetworkChangeNotifier, but platform 283 // the test suite can create a MockNetworkChangeNotifier, but platform
283 // specific NetworkChangeNotifiers can also be created for testing. To use, 284 // specific NetworkChangeNotifiers can also be created for testing. To use,
284 // create an DisableForTest object, and then create the new 285 // create an DisableForTest object, and then create the new
285 // NetworkChangeNotifier object. The NetworkChangeNotifier must be 286 // NetworkChangeNotifier object. The NetworkChangeNotifier must be
286 // destroyed before the DisableForTest object, as its destruction will restore 287 // destroyed before the DisableForTest object, as its destruction will restore
(...skipping 25 matching lines...) Expand all
312 313
313 // Computes NetworkChange signal from IPAddress and ConnectionType signals. 314 // Computes NetworkChange signal from IPAddress and ConnectionType signals.
314 scoped_ptr<NetworkChangeCalculator> network_change_calculator_; 315 scoped_ptr<NetworkChangeCalculator> network_change_calculator_;
315 316
316 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier); 317 DISALLOW_COPY_AND_ASSIGN(NetworkChangeNotifier);
317 }; 318 };
318 319
319 } // namespace net 320 } // namespace net
320 321
321 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_ 322 #endif // NET_BASE_NETWORK_CHANGE_NOTIFIER_H_
OLDNEW
« no previous file with comments | « net/base/net_error_list.h ('k') | net/http/http_network_session.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698