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

Unified Diff: net/dns/dns_config_service_unittest.cc

Issue 10873018: [net] Move DnsConfigService to NetworkChangeNotifier. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix null-dereference 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
Index: net/dns/dns_config_service_unittest.cc
diff --git a/net/dns/dns_config_service_unittest.cc b/net/dns/dns_config_service_unittest.cc
index 25338090a3e588312be4fb622c358c1bc549da78..5f8521a80fa71131dceaff24ae59be63484d24c4 100644
--- a/net/dns/dns_config_service_unittest.cc
+++ b/net/dns/dns_config_service_unittest.cc
@@ -29,7 +29,8 @@ class DnsConfigServiceTest : public testing::Test {
protected:
class TestDnsConfigService : public DnsConfigService {
public:
- virtual void OnDNSChanged(unsigned detail) OVERRIDE {}
+ virtual void ReadNow() OVERRIDE {}
+ virtual bool StartWatching() OVERRIDE { return true; }
// Expose the protected methods to this test suite.
void InvalidateConfig() {
@@ -84,8 +85,8 @@ class DnsConfigServiceTest : public testing::Test {
quit_on_config_ = false;
service_.reset(new TestDnsConfigService());
- service_->Watch(base::Bind(&DnsConfigServiceTest::OnConfigChanged,
- base::Unretained(this)));
+ service_->WatchConfig(base::Bind(&DnsConfigServiceTest::OnConfigChanged,
+ base::Unretained(this)));
EXPECT_FALSE(last_config_.IsValid());
}
@@ -196,8 +197,8 @@ TEST_F(DnsConfigServiceTest, FLAKY_GetSystemConfig) {
service_.reset();
scoped_ptr<DnsConfigService> service(DnsConfigService::CreateSystemService());
- service->Read(base::Bind(&DnsConfigServiceTest::OnConfigChanged,
- base::Unretained(this)));
+ service->ReadConfig(base::Bind(&DnsConfigServiceTest::OnConfigChanged,
+ base::Unretained(this)));
base::TimeDelta kTimeout = TestTimeouts::action_max_timeout();
WaitForConfig(kTimeout);
ASSERT_TRUE(last_config_.IsValid()) << "Did not receive DnsConfig in " <<

Powered by Google App Engine
This is Rietveld 408576698