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

Unified Diff: chrome/browser/net/predictor_unittest.cc

Issue 1290243007: Shift URLRequestContextStorage over to taking scoped_ptrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Paul_BuilderGrab
Patch Set: Sync'd to revision p349162. Created 5 years, 3 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 | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/proxy_service_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/predictor_unittest.cc
diff --git a/chrome/browser/net/predictor_unittest.cc b/chrome/browser/net/predictor_unittest.cc
index 61460aee150163d7beebd812b5ca6d7dcb45a2a4..8a2d9d095ced4e1d1a408eb06540607d2aa58ae5 100644
--- a/chrome/browser/net/predictor_unittest.cc
+++ b/chrome/browser/net/predictor_unittest.cc
@@ -791,7 +791,9 @@ TEST_F(PredictorTest, ProxyDefinitelyEnabled) {
net::ProxyConfig config;
config.proxy_rules().ParseFromString("http=socks://localhost:12345");
- testing_master.proxy_service_ = net::ProxyService::CreateFixed(config);
+ scoped_ptr<net::ProxyService> proxy_service(
+ net::ProxyService::CreateFixed(config));
+ testing_master.proxy_service_ = proxy_service.get();
GURL goog("http://www.google.com:80");
testing_master.Resolve(goog, UrlInfo::OMNIBOX_MOTIVATED);
@@ -799,7 +801,6 @@ TEST_F(PredictorTest, ProxyDefinitelyEnabled) {
// Proxy is definitely in use, so there is no need to pre-resolve the domain.
EXPECT_TRUE(testing_master.work_queue_.IsEmpty());
- delete testing_master.proxy_service_;
testing_master.Shutdown();
}
@@ -809,7 +810,9 @@ TEST_F(PredictorTest, ProxyDefinitelyNotEnabled) {
Predictor testing_master(true, true);
net::ProxyConfig config = net::ProxyConfig::CreateDirect();
- testing_master.proxy_service_ = net::ProxyService::CreateFixed(config);
+ scoped_ptr<net::ProxyService> proxy_service(
+ net::ProxyService::CreateFixed(config));
+ testing_master.proxy_service_ = proxy_service.get();
GURL goog("http://www.google.com:80");
testing_master.Resolve(goog, UrlInfo::OMNIBOX_MOTIVATED);
@@ -817,7 +820,6 @@ TEST_F(PredictorTest, ProxyDefinitelyNotEnabled) {
// Proxy is not in use, so the name has been registered for pre-resolve.
EXPECT_FALSE(testing_master.work_queue_.IsEmpty());
- delete testing_master.proxy_service_;
testing_master.Shutdown();
}
@@ -828,7 +830,9 @@ TEST_F(PredictorTest, ProxyMaybeEnabled) {
Predictor testing_master(true, true);
net::ProxyConfig config = net::ProxyConfig::CreateFromCustomPacURL(GURL(
"http://foopy/proxy.pac"));
- testing_master.proxy_service_ = net::ProxyService::CreateFixed(config);
+ scoped_ptr<net::ProxyService> proxy_service(
+ net::ProxyService::CreateFixed(config));
+ testing_master.proxy_service_ = proxy_service.get();
GURL goog("http://www.google.com:80");
testing_master.Resolve(goog, UrlInfo::OMNIBOX_MOTIVATED);
@@ -837,7 +841,6 @@ TEST_F(PredictorTest, ProxyMaybeEnabled) {
// name has been registered for pre-resolve.
EXPECT_FALSE(testing_master.work_queue_.IsEmpty());
- delete testing_master.proxy_service_;
testing_master.Shutdown();
}
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/net/proxy_service_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698