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

Unified Diff: chrome/browser/component_updater/test/component_updater_service_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 yet again Created 6 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
Index: chrome/browser/component_updater/test/component_updater_service_unittest.cc
diff --git a/chrome/browser/component_updater/test/component_updater_service_unittest.cc b/chrome/browser/component_updater/test/component_updater_service_unittest.cc
index b52777c7994a48e7b63f14bee28c561dfb26127c..7a1869850e79875f5f760a368f03a1507a3c8870 100644
--- a/chrome/browser/component_updater/test/component_updater_service_unittest.cc
+++ b/chrome/browser/component_updater/test/component_updater_service_unittest.cc
@@ -7,6 +7,7 @@
#include <vector>
#include "base/files/file_util.h"
+#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
@@ -25,6 +26,7 @@
#include "libxml/globals.h"
#include "net/base/upload_bytes_element_reader.h"
#include "net/url_request/url_fetcher.h"
+#include "net/url_request/url_request.h"
#include "net/url_request/url_request_test_util.h"
#include "url/gurl.h"
@@ -1182,10 +1184,11 @@ content::ResourceThrottle* RequestTestResourceThrottle(
TestResourceController* controller,
const char* crx_id) {
net::TestURLRequestContext context;
- net::TestURLRequest url_request(GURL("http://foo.example.com/thing.bin"),
- net::DEFAULT_PRIORITY,
- NULL,
- &context);
+ scoped_ptr<net::URLRequest> url_request(context.CreateRequest(
+ GURL("http://foo.example.com/thing.bin"),
+ net::DEFAULT_PRIORITY,
+ NULL,
+ NULL));
content::ResourceThrottle* rt = GetOnDemandResourceThrottle(cus, crx_id);
rt->set_controller_for_testing(controller);

Powered by Google App Engine
This is Rietveld 408576698