Chromium Code Reviews| Index: net/url_request/url_request.h |
| diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h |
| index f1d90edb558fe1f40a5b2c61c2be0c9f7576dc36..91aad84cd65eca3612b6bf44158a37cde47090db 100644 |
| --- a/net/url_request/url_request.h |
| +++ b/net/url_request/url_request.h |
| @@ -303,8 +303,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), |
| ReferrerPolicy referrer_policy() const { return referrer_policy_; } |
| void set_referrer_policy(ReferrerPolicy referrer_policy); |
| - // Sets the delegate of the request. This value may be changed at any time, |
| - // and it is permissible for it to be null. |
| + // Sets the delegate of the request. This is only to allow creating a request |
| + // before creating its delegate. |delegate| must be non-NULL and the request |
| + // must not yet have a Delegate set. |
| void set_delegate(Delegate* delegate); |
| // Indicates that the request body should be sent using chunked transfer |
| @@ -522,8 +523,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), |
| // Returns a globally unique identifier for this request. |
| uint64 identifier() const { return identifier_; } |
| - // This method is called to start the request. The delegate will receive |
| - // a OnResponseStarted callback when the request is started. |
| + // This method is called to start the request. The Delegate will receive |
| + // a OnResponseStarted callback when the request is started. The request |
| + // must have a delegate set before this method is called. |
|
xunjieli
2015/12/14 20:12:08
nit: maybe s/delegate/Delegate to be consistent wi
mmenke
2015/12/14 20:24:11
I decided to go with "delegate" in both places ins
|
| void Start(); |
| // This method may be called at any time after Start() has been called to |
| @@ -621,9 +623,6 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe), |
| // due to HSTS. If so, |redirect_url| is rewritten to the new HTTPS URL. |
| bool GetHSTSRedirect(GURL* redirect_url) const; |
| - // TODO(willchan): Undo this. Only temporarily public. |
| - bool has_delegate() const { return delegate_ != NULL; } |
| - |
| // NOTE(willchan): This is just temporary for debugging |
| // http://crbug.com/90971. |
| // Allows to setting debug info into the URLRequest. |