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

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

Issue 11419034: net: Move ownership of UploadDataStream from URLRequestHttpJob to URLRequest (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix ASAN 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
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_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 14 matching lines...) Expand all
25 class AuthChallengeInfo; 25 class AuthChallengeInfo;
26 class AuthCredentials; 26 class AuthCredentials;
27 class CookieOptions; 27 class CookieOptions;
28 class HttpRequestHeaders; 28 class HttpRequestHeaders;
29 class HttpResponseInfo; 29 class HttpResponseInfo;
30 class IOBuffer; 30 class IOBuffer;
31 class NetworkDelegate; 31 class NetworkDelegate;
32 class SSLCertRequestInfo; 32 class SSLCertRequestInfo;
33 class SSLInfo; 33 class SSLInfo;
34 class URLRequest; 34 class URLRequest;
35 class UploadData; 35 class UploadDataStream;
36 class URLRequestStatus; 36 class URLRequestStatus;
37 class X509Certificate; 37 class X509Certificate;
38 38
39 class NET_EXPORT URLRequestJob : public base::RefCounted<URLRequestJob>, 39 class NET_EXPORT URLRequestJob : public base::RefCounted<URLRequestJob>,
40 public base::SystemMonitor::PowerObserver { 40 public base::SystemMonitor::PowerObserver {
41 public: 41 public:
42 explicit URLRequestJob(URLRequest* request, 42 explicit URLRequestJob(URLRequest* request,
43 NetworkDelegate* network_delegate); 43 NetworkDelegate* network_delegate);
44 44
45 // Returns the request that owns this job. THIS POINTER MAY BE NULL if the 45 // Returns the request that owns this job. THIS POINTER MAY BE NULL if the
46 // request was destroyed. 46 // request was destroyed.
47 URLRequest* request() const { 47 URLRequest* request() const {
48 return request_; 48 return request_;
49 } 49 }
50 50
51 // Sets the upload data, most requests have no upload data, so this is a NOP. 51 // Sets the upload data, most requests have no upload data, so this is a NOP.
52 // Job types supporting upload data will override this. 52 // Job types supporting upload data will override this.
53 virtual void SetUpload(UploadData* upload); 53 virtual void SetUpload(UploadDataStream* upload_data_stream);
54 54
55 // Sets extra request headers for Job types that support request headers. 55 // Sets extra request headers for Job types that support request headers.
56 virtual void SetExtraRequestHeaders(const HttpRequestHeaders& headers); 56 virtual void SetExtraRequestHeaders(const HttpRequestHeaders& headers);
57 57
58 // If any error occurs while starting the Job, NotifyStartError should be 58 // If any error occurs while starting the Job, NotifyStartError should be
59 // called. 59 // called.
60 // This helps ensure that all errors follow more similar notification code 60 // This helps ensure that all errors follow more similar notification code
61 // paths, which should simplify testing. 61 // paths, which should simplify testing.
62 virtual void Start() = 0; 62 virtual void Start() = 0;
63 63
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 NetworkDelegate* network_delegate_; 379 NetworkDelegate* network_delegate_;
380 380
381 base::WeakPtrFactory<URLRequestJob> weak_factory_; 381 base::WeakPtrFactory<URLRequestJob> weak_factory_;
382 382
383 DISALLOW_COPY_AND_ASSIGN(URLRequestJob); 383 DISALLOW_COPY_AND_ASSIGN(URLRequestJob);
384 }; 384 };
385 385
386 } // namespace net 386 } // namespace net
387 387
388 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_ 388 #endif // NET_URL_REQUEST_URL_REQUEST_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698