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

Unified Diff: net/base/dns_reload_timer.h

Issue 6033006: Use FileWatcher to watch system resolver config, on systems that require... Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
Index: net/base/dns_reload_timer.h
===================================================================
--- net/base/dns_reload_timer.h (revision 70147)
+++ net/base/dns_reload_timer.h (working copy)
@@ -8,7 +8,12 @@
#include "build/build_config.h"
-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
+#define WATCH_RESOLV_CONF \
+ defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_OPENBSD)
+
+#if WATCH_RESOLV_CONF
+namespace base { class Thread; }
+
namespace net {
// DnsReloadTimerExpired tests the thread local DNS reload timer and, if it has
@@ -16,6 +21,14 @@
// host_resolver_proc.cc for details.
bool DnsReloadTimerHasExpired();
+// Returns true if a change to resolver configuration has been detected.
+bool ResolvConfUpdated();
+
+// Installs a FileWatch on system's resolver config (/etc/resolv.conf).
+// FileWatch has to run in file thread, so all this does is schedule a task to
+// run on file_thread.
+void InitResolvConfWatcher(base::Thread* file_thread);
+
} // namespace net
#endif

Powered by Google App Engine
This is Rietveld 408576698