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

Unified Diff: net/base/network_change_notifier_linux.cc

Issue 10873018: [net] Move DnsConfigService to NetworkChangeNotifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comment Created 8 years, 4 months 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
« no previous file with comments | « net/base/network_change_notifier_linux.h ('k') | net/base/network_change_notifier_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/network_change_notifier_linux.cc
diff --git a/net/base/network_change_notifier_linux.cc b/net/base/network_change_notifier_linux.cc
index 1638f974fc97255530aec93a9067c4844e6d69ad..8bc6cc83826e236a5092fca5df7629eb7b707a70 100644
--- a/net/base/network_change_notifier_linux.cc
+++ b/net/base/network_change_notifier_linux.cc
@@ -26,7 +26,7 @@
#include "dbus/object_proxy.h"
#include "net/base/address_tracker_linux.h"
#include "net/base/net_errors.h"
-#include "net/dns/dns_config_watcher.h"
+#include "net/dns/dns_config_service.h"
namespace net {
@@ -262,7 +262,7 @@ class NetworkChangeNotifierLinux::Thread : public base::Thread {
// Used to detect online/offline state changes.
NetworkManagerApi network_manager_api_;
- internal::DnsConfigWatcher dns_watcher_;
+ scoped_ptr<DnsConfigService> dns_config_service_;
internal::AddressTrackerLinux address_tracker_;
DISALLOW_COPY_AND_ASSIGN(Thread);
@@ -285,13 +285,15 @@ NetworkChangeNotifierLinux::Thread::~Thread() {
void NetworkChangeNotifierLinux::Thread::Init() {
network_manager_api_.Init();
- dns_watcher_.Init();
+ dns_config_service_ = DnsConfigService::CreateSystemService();
+ dns_config_service_->WatchConfig(
+ base::Bind(&NetworkChangeNotifier::SetDnsConfig));
address_tracker_.Init();
}
void NetworkChangeNotifierLinux::Thread::CleanUp() {
network_manager_api_.CleanUp();
- dns_watcher_.CleanUp();
+ dns_config_service_.reset();
}
NetworkChangeNotifierLinux* NetworkChangeNotifierLinux::Create() {
« no previous file with comments | « net/base/network_change_notifier_linux.h ('k') | net/base/network_change_notifier_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698