summaryrefslogtreecommitdiffstats
path: root/net/base/network_change_notifier_linux.h
Commit message (Collapse)AuthorAgeFilesLines
* Start calculating new combined NetworkChangeNotifier signal from previous ↵pauljensen@chromium.org2012-12-081-0/+1
| | | | | | | | OnIPAddressChanged and OnConnectionTypeChanged signals. For now it uses delay constants chosen by experimentation but this commit includes histograms to tune the constants. Review URL: https://chromiumcodereview.appspot.com/11360108 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171920 0039d316-1c4b-4281-b951-d872f2087c98
* Use Netlink instead of NetworkManager (via D-bus) to monitor networkpauljensen@chromium.org2012-11-291-8/+1
| | | | | | | | | | | connectivity on Linux. BUG=117973 Review URL: https://chromiumcodereview.appspot.com/11359141 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@170211 0039d316-1c4b-4281-b951-d872f2087c98
* [net] Move DnsConfigService to NetworkChangeNotifier.szym@chromium.org2012-08-311-1/+1
| | | | | | | | | | | | | This merges DnsConfigWatcher back into DnsConfigService and installs DnsConfigService at NetworkChangeNotifier. It removes |detail| from OnDNSChanged callback, and exposes NetworkChangeNotifier::GetDnsConfig. BUG=142142 Review URL: https://chromiumcodereview.appspot.com/10873018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@154485 0039d316-1c4b-4281-b951-d872f2087c98
* [net] Adds AddressTrackerLinux which keeps track of interface addresses ↵szym@chromium.org2012-07-161-0/+3
| | | | | | | | | | | using rtnetlink. BUG=100690,113993 TEST=./net_unittests --gtest_filter=AddressTrackerLinuxTest.* Review URL: https://chromiumcodereview.appspot.com/10689015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146907 0039d316-1c4b-4281-b951-d872f2087c98
* Remove the rest of #pragma once in one big CL.ajwong@chromium.org2012-07-111-1/+0
| | | | | | | | | For context see this thread: https://groups.google.com/a/chromium.org/forum/?fromgroups#!topic/chromium-dev/RMcVNGjB4II TBR=thakis,pkasting,jam git-svn-id: svn://svn.chromium.org/chrome/trunk/src@146163 0039d316-1c4b-4281-b951-d872f2087c98
* Support for navigator.connection APIdroger@google.com2012-05-241-1/+1
| | | | | | | | | | | | | | | | | | This replaces the online state (a boolean) by a more complex state (UNKNOWN/NONE /2G/3G/4G/WIFI/ETHERNET) inspired by the Network Information API (http://www.w3.org/TR/netinfo-api/). Breakdown of the modified files: - network_change_notifier.h/.cc: actual API change - network_change_notifier_*: platform specific implementations. This CL only provide a basic implementation where CONNECTION_UNKNOWN is returned when online and CONNECTION_NONE is returned when offline. - other files: call sites for the static function and observer implementations. Most of the time this only changes the test IsOffline() by (GetConnectionType() == CONNECTION_NONE). BUG=112937 TEST=NONE Review URL: https://chromiumcodereview.appspot.com/9147026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138780 0039d316-1c4b-4281-b951-d872f2087c98
* [net/dns] Isolate DnsConfigWatcher from DnsConfigService.szym@chromium.org2012-05-161-1/+2
| | | | | | | | | | | | DnsConfigWatcher is installed at NetworkChangeNotifier and provides signals to DNSObservers. DnsConfigService becomes a DNSObserver. BUG=114827,114223,128166 TEST=./net_unittests --gtest_filter=DnsConfigService* Review URL: https://chromiumcodereview.appspot.com/10377092 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137457 0039d316-1c4b-4281-b951-d872f2087c98
* Offline state detection for linux, using new D-Bus library.adamk@chromium.org2011-11-161-2/+12
| | | | | | | | | | | | | 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-9/+1
| | | | | | | | | | | | | 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-1/+9
| | | | | | | | | 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
* Minor cleanup of Mac/Linux network change notifier code:mmenke@chromium.org2011-09-301-1/+2
| | | | | | | | | | | | | Add OVERRIDE, replace NewRunnableMethod with Bind, fix a couple includes. BUG=none TEST=compiles Review URL: http://codereview.chromium.org/8073027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103402 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Refactor to avoid using DestructionObserver in NetworkChangeNotifierLinux.willchan@chromium.org2010-10-211-34/+4
| | | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3879003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63413 0039d316-1c4b-4281-b951-d872f2087c98
* Return ERR_INTERNET_DISCONNECTED in place of ERR_NAME_NOT_RESOLVED and ↵eroman@chromium.org2010-10-091-0/+3
| | | | | | | | | | | | 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-32/+22
| | | | | | | | | | | | | | * 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-5/+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/+5
| | | | | | | | 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-11/+5
| | | | | | | | | | | | 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
* Introduced artificial processing delay to work around the issue of proxy ↵zelidrag@chromium.org2010-06-141-0/+11
| | | | | | | | | | | | | initialization before name resolving is functional in ChromeOS. This should be removed once this bug chromium-os:3996 is properly fixed. BUG=chromium-os:3996 TEST=check the bug for repro steps Review URL: http://codereview.chromium.org/2796007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49716 0039d316-1c4b-4281-b951-d872f2087c98
* Remove assertion on correct NetworkChangeNotifierLinux cleanup.willchan@chromium.org2010-05-281-1/+2
| | | | | | | | BUG=36890 Review URL: http://codereview.chromium.org/2340002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48504 0039d316-1c4b-4281-b951-d872f2087c98
* Stop watching the netlink file descriptor before the message pump is destroyed.eroman@chromium.org2010-04-121-2/+11
| | | | | | | | | | A better fix is to make FileDescriptorWatcher handle this internally, will track that as a follow-up issue. BUG=39932 Review URL: http://codereview.chromium.org/1550003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44296 0039d316-1c4b-4281-b951-d872f2087c98
* Remove a dead line of code.eroman@chromium.org2010-04-011-3/+0
| | | | | | | | | BUG=None Test=None Review URL: http://codereview.chromium.org/1541010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43386 0039d316-1c4b-4281-b951-d872f2087c98
* Reland 39942 - Switch NetworkChangeNotifier implementations to use ObserverList.willchan@chromium.org2010-02-251-4/+5
| | | | | | | | | Fixed build problem with database_tracker.(cc|h). BUG=36590 Review URL: http://codereview.chromium.org/660039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39983 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 39942 - Switch NetworkChangeNotifier implementations to use ObserverList.willchan@chromium.org2010-02-241-5/+4
| | | | | | | | | | | | | Fix up observer list so we can use FOR_EACH_OBSERVER when check_empty is set. Clean up the ObserverList API a bit, replacing GetElementAt() with HasObserver() and Clear(). BUG=36590 Review URL: http://codereview.chromium.org/652205 TBR=willchan@chromium.org Review URL: http://codereview.chromium.org/661029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39945 0039d316-1c4b-4281-b951-d872f2087c98
* Switch NetworkChangeNotifier implementations to use ObserverList.willchan@chromium.org2010-02-241-4/+5
| | | | | | | | | | Fix up observer list so we can use FOR_EACH_OBSERVER when check_empty is set. Clean up the ObserverList API a bit, replacing GetElementAt() with HasObserver() and Clear(). BUG=36590 Review URL: http://codereview.chromium.org/652205 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39942 0039d316-1c4b-4281-b951-d872f2087c98
* Re-lands r39417: "Implement NetworkChangeNotifierLinux."willchan@chromium.org2010-02-191-2/+25
| | | | | | | | The change broke certain linux buildbots due to netlink.h forward declaring struct net, which conflicts with the net namespace. The fix is to move the netlink code into a separate file which is not in the net namespace. Review URL: http://codereview.chromium.org/650009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39465 0039d316-1c4b-4281-b951-d872f2087c98
* Revert r39417: "Implement NetworkChangeNotifierLinux."willchan@chromium.org2010-02-191-33/+2
| | | | | | | | | It broke the chromium arm build. BUG=26156 Review URL: http://codereview.chromium.org/651006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39418 0039d316-1c4b-4281-b951-d872f2087c98
* Implement NetworkChangeNotifierLinux.willchan@chromium.org2010-02-191-2/+33
| | | | | | | | | BUG=26156 TEST=Browse a bit. Observe about:net-internals/hostresolver.hostcache to note that the cache is populated with data. sudo /sbin/ifconfig lo down; sudo /sbin/ifconfig lo up. Observe about:net-internals/hostresolver.hostcache to note that the cache should now be empty (or almost empty, since other host resolutions may have happened in the meanwhile). Review URL: http://codereview.chromium.org/645001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39417 0039d316-1c4b-4281-b951-d872f2087c98
* Detects network changes. Only for Mac OS X so far. Hooks up ↵willchan@chromium.org2009-12-211-0/+37
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