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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 501163002: Make URLRequest's constructor private, and make URLRequestContext a friend class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge? Created 6 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/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 7e22546891da70a95f2daeb57614a7c41bdf7289..00548590190a450ef1e75ad5ffd3c9dd5216c42e 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -18,6 +18,7 @@
#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/format_macros.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
@@ -1826,12 +1827,12 @@ TEST_F(URLRequestTest, InterceptLoadTimingEarlyConnectWithProxy) {
TEST_F(URLRequestTest, Identifiers) {
TestDelegate d;
TestURLRequestContext context;
- TestURLRequest req(
- GURL("http://example.com"), DEFAULT_PRIORITY, &d, &context);
- TestURLRequest other_req(
- GURL("http://example.com"), DEFAULT_PRIORITY, &d, &context);
+ scoped_ptr<URLRequest> req(context.CreateRequest(
+ GURL("http://example.com"), DEFAULT_PRIORITY, &d, NULL));
+ scoped_ptr<URLRequest> other_req(context.CreateRequest(
+ GURL("http://example.com"), DEFAULT_PRIORITY, &d, NULL));
- ASSERT_NE(req.identifier(), other_req.identifier());
+ ASSERT_NE(req->identifier(), other_req->identifier());
}
// Check that a failure to connect to the proxy is reported to the network

Powered by Google App Engine
This is Rietveld 408576698