diff options
author | sdefresne <sdefresne@chromium.org> | 2015-09-11 08:16:10 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-11 15:17:25 +0000 |
commit | d8143e7373719ed53b6cef35c234b0498b771d48 (patch) | |
tree | ed6928fcb2e272e976009b6188f54c495818e8f5 /net | |
parent | 348ded1cd90483e7fbe8fba42fc4634c9120624a (diff) | |
download | chromium_src-d8143e7373719ed53b6cef35c234b0498b771d48.zip chromium_src-d8143e7373719ed53b6cef35c234b0498b771d48.tar.gz chromium_src-d8143e7373719ed53b6cef35c234b0498b771d48.tar.bz2 |
Stop building FilePathWatcher on iOS.
Stop using FilePathWatcher on iOS as it does not works on iOS devices
as can be seen when running the unit tests that never finish as no
events are reported.
Remove the only usage of FilePathWatcher that was present on iOS. This
does not change the behaviour since previously even in case of changes
to /etc/hosts, the watcher was never informed of any changes. Moreover
the file is not editable by the user and so the file will only change
after OS upgrade (which requires an app restart) or due to a list of
static hosts send as part of dynamic IP negociation (i.e. after a local
IP change).
BUG=477102
Review URL: https://codereview.chromium.org/1304233004
Cr-Commit-Position: refs/heads/master@{#348400}
Diffstat (limited to 'net')
-rw-r--r-- | net/dns/dns_config_service_posix.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc index 02877e7..4300dfc 100644 --- a/net/dns/dns_config_service_posix.cc +++ b/net/dns/dns_config_service_posix.cc @@ -210,6 +210,7 @@ class DnsConfigServicePosix::Watcher { DNS_CONFIG_WATCH_FAILED_TO_START_CONFIG, DNS_CONFIG_WATCH_MAX); } +#if !defined(OS_IOS) if (!hosts_watcher_.Watch( base::FilePath(service_->file_path_hosts_), false, base::Bind(&Watcher::OnHostsChanged, base::Unretained(this)))) { @@ -219,6 +220,7 @@ class DnsConfigServicePosix::Watcher { DNS_CONFIG_WATCH_FAILED_TO_START_HOSTS, DNS_CONFIG_WATCH_MAX); } +#endif return success; } @@ -249,7 +251,9 @@ class DnsConfigServicePosix::Watcher { DnsConfigServicePosix* service_; DnsConfigWatcher config_watcher_; +#if !defined(OS_IOS) base::FilePathWatcher hosts_watcher_; +#endif base::WeakPtrFactory<Watcher> weak_factory_; |