summaryrefslogtreecommitdiffstats
path: root/net/base/network_change_notifier.h
Commit message (Collapse)AuthorAgeFilesLines
* Offline state detection for linux, using new D-Bus library.adamk@chromium.org2011-11-161-0/+1
| | | | | | | | | | | | | Relanding with fix for component build: use NET_EXPORT_PRIVATE in network_change_notifier_linux.h. BUG=53473 TEST=see attachment on bug 7469 R=willchan@chromium.org Review URL: http://codereview.chromium.org/8575013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110374 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "Offline state detection for linux, using new D-Bus library."adamk@chromium.org2011-11-161-1/+0
| | | | | | | | | | | | | This reverts commit b383640dbf09a7696e65a8ebe50711562c9943b4. Broke the Linux shared build. BUG=53473 TBR=willchan Review URL: http://codereview.chromium.org/8578013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110346 0039d316-1c4b-4281-b951-d872f2087c98
* Offline state detection for linux, using new D-Bus library.adamk@chromium.org2011-11-161-0/+1
| | | | | | | | | BUG=53473 TEST=see attachment on bug 7469 Review URL: http://codereview.chromium.org/8249008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110344 0039d316-1c4b-4281-b951-d872f2087c98
* Experimental workaround for CHECK in NetworkChangeNotifierWin.mmenke@chromium.org2011-10-051-0/+21
| | | | | | | | | | | Also adds a related UMA histogram. BUG=69198 TEST=NetworkChangeNotifierWinTest.*, UMA metrics Review URL: http://codereview.chromium.org/7886036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104120 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 99677 (didn't help) - Revert 99666 (sync tests started failing on ↵thakis@chromium.org2011-09-061-0/+21
| | | | | | | | | | | | | | | | | | | | | mac10.6: http://build.chromium.org/p/chromium/builders/Mac10.6%20Sync/builds/9198 - Linux: Monitor resolv.conf for changes and use that to reload resolver. BUG=67734 TEST=manual testing by poking at resolv.conf Review URL: http://codereview.chromium.org/6903061 TBR=craig.schlenter@chromium.org Review URL: http://codereview.chromium.org/7833030 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/7737034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99693 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 99666 (sync tests started failing on mac10.6:thakis@chromium.org2011-09-051-21/+0
| | | | | | | | | | | | | | | | http://build.chromium.org/p/chromium/builders/Mac10.6%20Sync/builds/9198 - Linux: Monitor resolv.conf for changes and use that to reload resolver. BUG=67734 TEST=manual testing by poking at resolv.conf Review URL: http://codereview.chromium.org/6903061 TBR=craig.schlenter@chromium.org Review URL: http://codereview.chromium.org/7833030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99677 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: Monitor resolv.conf for changes and use that to reload resolver.craig.schlenter@chromium.org2011-09-051-0/+21
| | | | | | | | | BUG=67734 TEST=manual testing by poking at resolv.conf Review URL: http://codereview.chromium.org/6903061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@99666 0039d316-1c4b-4281-b951-d872f2087c98
* Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE.darin@chromium.org2011-08-121-4/+4
| | | | | | Review URL: http://codereview.chromium.org/7529043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96560 0039d316-1c4b-4281-b951-d872f2087c98
* Fixed network connectivity checks specific to ChromeOS. Previously we were ↵zelidrag@chromium.org2011-07-111-0/+6
| | | | | | | | | | | | doing this check only for network specific changes and missing the initial connect event. This change also include the fix for passing the initial connectivity state of the network for all platforms. BUG=chromium-os:17165,86538 TEST=Make sure "Your device is offline" page refreshes properly once connection is establishes on chromeos. Review URL: http://codereview.chromium.org/7285021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92062 0039d316-1c4b-4281-b951-d872f2087c98
* Fix debug crash caused by NetworkChangeNotifierChromeos.rhashimoto@chromium.org2011-06-081-1/+1
| | | | | | | | | | | | | | | - Convert NetworkChangeNotifier::NotifyObserversOfOnlineStateChange() to static. - Remove ScopedRunnableMethodFactory member from NetworkChangeNotifierChromeos. The problem is that ScopedRunnableMethodFactory is not thread-safe, so tasks created by it can only be posted to the current thread. BUG=chromium-os:16197 TEST=none Review URL: http://codereview.chromium.org/7009002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88346 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to more code, this time what's used by chrome.dllrvargas@google.com2011-05-311-1/+1
| | | | | | | | BUG=76997 TEST=none Review URL: http://codereview.chromium.org/7082026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87393 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to net/baservargas@google.com2011-05-181-5/+4
| | | | | | | | BUG=76997 TEST=NONE Review URL: http://codereview.chromium.org/6969077 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85785 0039d316-1c4b-4281-b951-d872f2087c98
* Plumb through NetworkChangeNotifier::IsOffline() to WebKit, enablingadamk@chromium.org2011-03-041-7/+29
| | | | | | | | | | | | | navigator.onLine and online/offline events. Only works on Windows at the moment, as IsCurrentlyOffline() is supported only by NetworkChangeNotifierWin. Most of the changes are due to the need to support two different kinds of NetworkChangeNotifier observers. Both observers currently happen to trigger on the same event, but that could change, e.g., if we store the previous online state and only notify on a change. Thus the need for two different observer interfaces, and associated Add/Remove methods. BUG=7469 TEST=Load https://bug336359.bugzilla.mozilla.org/attachment.cgi?id=220609, unplug network cable, reload, see that page changes to note offline status Review URL: http://codereview.chromium.org/6526059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76985 0039d316-1c4b-4281-b951-d872f2087c98
* Return ERR_INTERNET_DISCONNECTED in place of ERR_NAME_NOT_RESOLVED and ↵eroman@chromium.org2010-10-091-5/+15
| | | | | | | | | | | | ERR_ADDRESS_UNREACHABLE, when the user is in offline mode. This initial changelist includes the implementation just for Windows. BUG=53473 TEST=unplug network cable, try to connect to www.google.com --> should get the error ERR_INTERNET_DISCONNECTED. Next, try connecting directly to an IP address --> should get the error ERR_INTERNET_DISCONNECTED. Review URL: http://codereview.chromium.org/3634002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62050 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Massively simplify the NetworkChangeNotifier infrastructure:pkasting@chromium.org2010-06-251-12/+51
| | | | | | | | | | | | | | * Use a process-wide object (singleton pattern) * Create/destroy this object on the main thread, make it outlive all consumers * Make observer-related functions threadsafe As a result, the notifier can now be used by any thread (eliminating things like NetworkChangeObserverProxy and NetworkChangeNotifierProxy, and expanding its usefulness); its creation and inner workings are much simplified (eliminating implementation-specific classes); and it is simpler to access (eliminating things like NetworkChangeNotifierThread and a LOT of passing pointers around). BUG=none TEST=Unittests; network changes still trigger notifications Review URL: http://codereview.chromium.org/2802015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50895 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50402 (build failure) - Pass in NetLog to NetworkChangeNotifier.willchan@chromium.org2010-06-211-4/+1
| | | | | | | | | | | BUG=46822 Review URL: http://codereview.chromium.org/2857009 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/2843017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50406 0039d316-1c4b-4281-b951-d872f2087c98
* Pass in NetLog to NetworkChangeNotifier.willchan@chromium.org2010-06-211-1/+4
| | | | | | | | BUG=46822 Review URL: http://codereview.chromium.org/2857009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50402 0039d316-1c4b-4281-b951-d872f2087c98
* Implement a TODO: Move "NonThreadSafe" inheritance from ↵pkasting@chromium.org2010-06-171-3/+2
| | | | | | | | | | | | NetworkChangeNotifier interface to implementations. Also add CalledOnValidThread() DCHECKs in as many places as possible. Some minor style changes. BUG=none TEST=none Review URL: http://codereview.chromium.org/2813019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50139 0039d316-1c4b-4281-b951-d872f2087c98
* Pass the NetworkChangeNotifier to HostResolver.willchan@chromium.org2010-02-041-8/+4
| | | | | | | | | | | | | | | This requires the following refactors: (1) NetworkChangeNotifier moves out of HttpNetworkSession into IOThread. (2) HostResolver gets initialized with NetworkChangeNotifier. (3) NetworkChangeNotifier needs to get passed into HttpCache and HttpNetworkSession (required updating a lot of files). (4) NetworkChangeNotifier is no longer reference counted. It is owned by IOThread. (5) IOThread gains a new struct: Globals. It can only be used on the io thread. (6) ChromeURLRequestContextFactory uses IOThread::Globals to initialize ChromeURLRequest objects with the host resolver and network change notifier. BUG=26159 Review URL: http://codereview.chromium.org/552117 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38052 0039d316-1c4b-4281-b951-d872f2087c98
* Detects network changes. Only for Mac OS X so far. Hooks up ↵willchan@chromium.org2009-12-211-0/+56
TCPClientSocketPool to flush idle sockets on IP address change. BUG=http://crbug.com/26156 TEST=Run chrome with both network cable and wireless on. Go to www.google.com, twice. Verify second time via chrome://net-internals that the second request did not need a TCP_CONNECT_JOB, since we reused idle sockets. Unplug network cable. This should flush idle sockets. Go back to www.google.com. Check chrome://net-internals. Verify that there is a TCP_CONNECT_JOB for that request, because there was no idle socket to reuse. Review URL: http://codereview.chromium.org/460149 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35107 0039d316-1c4b-4281-b951-d872f2087c98