Commit 16ead78b authored by Greg Thompson's avatar Greg Thompson Committed by Chromium LUCI CQ

Switch to the new FilePathWatcher::Watch(Type) method in /net/dns.

FilePathWatcher::Watch(bool) is going away. No functional changes.

BUG=1147071
R=ericorth@chromium.org

Change-Id: I1a59c2d34b24725c46c9bc4e0ba7497151fa3ed5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2562670
Commit-Queue: Eric Orth <ericorth@chromium.org>
Reviewed-by: default avatarEric Orth <ericorth@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831989}
parent 2243e0ae
...@@ -259,7 +259,8 @@ class DnsConfigServicePosix::Watcher { ...@@ -259,7 +259,8 @@ class DnsConfigServicePosix::Watcher {
// Hosts file should never change on Android or iOS (and watching it on Android // Hosts file should never change on Android or iOS (and watching it on Android
// is problematic; see http://crbug.com/600442), so don't watch it there. // is problematic; see http://crbug.com/600442), so don't watch it there.
#if !defined(OS_ANDROID) && !defined(OS_IOS) #if !defined(OS_ANDROID) && !defined(OS_IOS)
if (!hosts_watcher_.Watch(base::FilePath(service_->file_path_hosts_), false, if (!hosts_watcher_.Watch(base::FilePath(service_->file_path_hosts_),
base::FilePathWatcher::Type::kNonRecursive,
base::BindRepeating(&Watcher::OnHostsChanged, base::BindRepeating(&Watcher::OnHostsChanged,
base::Unretained(this)))) { base::Unretained(this)))) {
LOG(ERROR) << "DNS hosts watch failed to start."; LOG(ERROR) << "DNS hosts watch failed to start.";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment