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

Unified Diff: net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc

Issue 10299002: Stop refcounting URLRequestContext. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More fixes Created 8 years, 8 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/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
diff --git a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
index 644b533aeea9f7d325c2e3c07768f3686e95be0d..02709a8625bc24bdac417f53be956bc8b1068def 100644
--- a/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
+++ b/net/proxy/dhcp_proxy_script_fetcher_win_unittest.cc
@@ -48,7 +48,7 @@ TEST(DhcpProxyScriptFetcherWin, AdapterNamesAndPacURLFromDhcp) {
class RealFetchTester {
public:
RealFetchTester()
- : context_((new TestURLRequestContext())),
+ : context_(new TestURLRequestContext),
fetcher_(new DhcpProxyScriptFetcherWin(context_.get())),
finished_(false),
on_completion_is_error_(false) {
@@ -114,7 +114,7 @@ class RealFetchTester {
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(30));
}
- scoped_refptr<URLRequestContext> context_;
+ scoped_ptr<URLRequestContext> context_;
scoped_ptr<DhcpProxyScriptFetcherWin> fetcher_;
bool finished_;
string16 pac_text_;
@@ -200,7 +200,7 @@ TEST(DhcpProxyScriptFetcherWin, RealFetchWithDeferredCancel) {
// the cancel is called before they complete.
RealFetchTester fetcher;
fetcher.fetcher_.reset(
- new DelayingDhcpProxyScriptFetcherWin(fetcher.context_));
+ new DelayingDhcpProxyScriptFetcherWin(fetcher.context_.get()));
fetcher.on_completion_is_error_ = true;
fetcher.RunTestWithDeferredCancel();
fetcher.WaitUntilDone();
@@ -372,7 +372,7 @@ class FetcherClient {
public:
FetcherClient()
: context_(new TestURLRequestContext),
- fetcher_(context_),
+ fetcher_(context_.get()),
finished_(false),
result_(ERR_UNEXPECTED) {
}
@@ -411,7 +411,7 @@ public:
fetcher_.ResetTestState();
}
- scoped_refptr<URLRequestContext> context_;
+ scoped_ptr<URLRequestContext> context_;
MockDhcpProxyScriptFetcherWin fetcher_;
bool finished_;
int result_;

Powered by Google App Engine
This is Rietveld 408576698