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

Side by Side Diff: net/url_request/url_request_http_job.h

Issue 10918279: Provide mutable members of UrlRequestContext via pure-virtual interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: const-ify HUAS getters Created 8 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "net/base/auth.h" 15 #include "net/base/auth.h"
16 #include "net/base/completion_callback.h" 16 #include "net/base/completion_callback.h"
17 #include "net/cookies/cookie_store.h" 17 #include "net/cookies/cookie_store.h"
18 #include "net/http/http_request_info.h" 18 #include "net/http/http_request_info.h"
19 #include "net/url_request/url_request_job.h" 19 #include "net/url_request/url_request_job.h"
20 #include "net/url_request/url_request_throttler_entry_interface.h" 20 #include "net/url_request/url_request_throttler_entry_interface.h"
21 21
22 namespace net { 22 namespace net {
23 23
24 class HttpResponseHeaders; 24 class HttpResponseHeaders;
25 class HttpResponseInfo; 25 class HttpResponseInfo;
26 class HttpTransaction; 26 class HttpTransaction;
27 class HttpUserAgentSettings;
27 class URLRequestContext; 28 class URLRequestContext;
28 29
29 // A URLRequestJob subclass that is built on top of HttpTransaction. It 30 // A URLRequestJob subclass that is built on top of HttpTransaction. It
30 // provides an implementation for both HTTP and HTTPS. 31 // provides an implementation for both HTTP and HTTPS.
31 class URLRequestHttpJob : public URLRequestJob { 32 class URLRequestHttpJob : public URLRequestJob {
32 public: 33 public:
33 static URLRequestJob* Factory(URLRequest* request, 34 static URLRequestJob* Factory(URLRequest* request,
34 NetworkDelegate* network_delegate, 35 NetworkDelegate* network_delegate,
35 const std::string& scheme); 36 const std::string& scheme);
36 37
37 protected: 38 protected:
38 URLRequestHttpJob(URLRequest* request, NetworkDelegate* network_delegate); 39 URLRequestHttpJob(URLRequest* request,
40 NetworkDelegate* network_delegate,
41 const HttpUserAgentSettings* http_user_agent_settings);
42
39 43
mmenke 2012/10/25 18:06:33 nit: Remove extra blank line.
40 // Shadows URLRequestJob's version of this method so we can grab cookies. 44 // Shadows URLRequestJob's version of this method so we can grab cookies.
41 void NotifyHeadersComplete(); 45 void NotifyHeadersComplete();
42 46
43 // Shadows URLRequestJob's method so we can record histograms. 47 // Shadows URLRequestJob's method so we can record histograms.
44 void NotifyDone(const URLRequestStatus& status); 48 void NotifyDone(const URLRequestStatus& status);
45 49
46 void DestroyTransaction(); 50 void DestroyTransaction();
47 51
48 void AddExtraHeaders(); 52 void AddExtraHeaders();
49 void AddCookieHeaderAndStart(); 53 void AddCookieHeaderAndStart();
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 240
237 // Flag used to verify that |this| is not deleted while we are awaiting 241 // Flag used to verify that |this| is not deleted while we are awaiting
238 // a callback from the NetworkDelegate. Used as a fail-fast mechanism. 242 // a callback from the NetworkDelegate. Used as a fail-fast mechanism.
239 // True if we are waiting a callback and 243 // True if we are waiting a callback and
240 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet, 244 // NetworkDelegate::NotifyURLRequestDestroyed has not been called, yet,
241 // to inform the NetworkDelegate that it may not call back. 245 // to inform the NetworkDelegate that it may not call back.
242 bool awaiting_callback_; 246 bool awaiting_callback_;
243 247
244 scoped_ptr<HttpTransactionDelegateImpl> http_transaction_delegate_; 248 scoped_ptr<HttpTransactionDelegateImpl> http_transaction_delegate_;
245 249
250 const HttpUserAgentSettings* http_user_agent_settings_;
251
246 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob); 252 DISALLOW_COPY_AND_ASSIGN(URLRequestHttpJob);
247 }; 253 };
248 254
249 } // namespace net 255 } // namespace net
250 256
251 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_ 257 #endif // NET_URL_REQUEST_URL_REQUEST_HTTP_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698