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

Unified Diff: net/url_request/url_request.h

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: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 5e87cdcaeda3bc6921f8916f7230fd5ba7e4209f..18ca2d30b6160d599d3894989c2c2ec67df4d93a 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -11,6 +11,7 @@
#include "base/debug/leak_tracker.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
#include "base/supports_user_data.h"
#include "base/threading/non_thread_safe.h"
@@ -273,18 +274,6 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
virtual ~Delegate() {}
};
- // URLRequests should almost always be created by calling
- // URLRequestContext::CreateRequest.
- //
- // If no cookie store or network delegate are passed in, will use the ones
- // from the URLRequestContext.
- URLRequest(const GURL& url,
- RequestPriority priority,
- Delegate* delegate,
- const URLRequestContext* context,
- CookieStore* cookie_store,
- NetworkDelegate* network_delegate);
-
// If destroyed after Start() has been called but while IO is pending,
// then the request will be effectively canceled and the delegate
// will not have any more of its methods called.
@@ -714,6 +703,18 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
private:
friend class URLRequestJob;
+ friend class URLRequestContext;
+
+ // URLRequests are always created by calling URLRequestContext::CreateRequest.
+ //
+ // If no cookie store or network delegate are passed in, will use the ones
+ // from the URLRequestContext.
+ URLRequest(const GURL& url,
+ RequestPriority priority,
+ Delegate* delegate,
+ const URLRequestContext* context,
+ CookieStore* cookie_store,
+ NetworkDelegate* network_delegate);
// Registers or unregisters a network interception class.
static void RegisterRequestInterceptor(Interceptor* interceptor);
« no previous file with comments | « components/policy/core/common/cloud/policy_header_service_unittest.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698