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

Unified Diff: net/base/host_resolver_unittest.h

Issue 24006: Work around a Purify bug by making an object used by NetTestSuite stack alloc... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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 | « no previous file | net/base/run_all_unittests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/host_resolver_unittest.h
===================================================================
--- net/base/host_resolver_unittest.h (revision 9313)
+++ net/base/host_resolver_unittest.h (working copy)
@@ -125,12 +125,20 @@
current_host_mapper_->set_previous_mapper(previous_host_mapper_.get());
}
+ ScopedHostMapper() {}
+
~ScopedHostMapper() {
HostMapper* old_mapper = SetHostMapper(previous_host_mapper_.get());
// The lifetimes of multiple instances must be nested.
CHECK(old_mapper == current_host_mapper_.get());
}
+ void Init(HostMapper* mapper) {
+ current_host_mapper_ = mapper;
+ previous_host_mapper_ = SetHostMapper(current_host_mapper_.get());
+ current_host_mapper_->set_previous_mapper(previous_host_mapper_.get());
+ }
+
private:
scoped_refptr<HostMapper> current_host_mapper_;
scoped_refptr<HostMapper> previous_host_mapper_;
« no previous file with comments | « no previous file | net/base/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698