OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_DATA_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_ |
6 #define NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "net/url_request/url_request.h" | 10 #include "net/url_request/url_request.h" |
11 #include "net/url_request/url_request_simple_job.h" | 11 #include "net/url_request/url_request_simple_job.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 class URLRequest; | 15 class URLRequest; |
16 | 16 |
17 class URLRequestDataJob : public URLRequestSimpleJob { | 17 class URLRequestDataJob : public URLRequestSimpleJob { |
18 public: | 18 public: |
19 explicit URLRequestDataJob(URLRequest* request); | 19 explicit URLRequestDataJob(URLRequest* request); |
20 | 20 |
21 static URLRequest::ProtocolFactory Factory; | 21 static URLRequest::ProtocolFactory Factory; |
22 | 22 |
23 // URLRequestSimpleJob | 23 // URLRequestSimpleJob |
24 virtual bool GetData(std::string* mime_type, | 24 virtual int GetData(std::string* mime_type, |
25 std::string* charset, | 25 std::string* charset, |
26 std::string* data) const OVERRIDE; | 26 std::string* data, |
| 27 const CompletionCallback& callback) const OVERRIDE; |
27 | 28 |
28 private: | 29 private: |
29 virtual ~URLRequestDataJob(); | 30 virtual ~URLRequestDataJob(); |
30 | 31 |
31 DISALLOW_COPY_AND_ASSIGN(URLRequestDataJob); | 32 DISALLOW_COPY_AND_ASSIGN(URLRequestDataJob); |
32 }; | 33 }; |
33 | 34 |
34 } // namespace net | 35 } // namespace net |
35 | 36 |
36 #endif // NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_ | 37 #endif // NET_URL_REQUEST_URL_REQUEST_DATA_JOB_H_ |
OLD | NEW |