| OLD | NEW |
| 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_SIMPLE_JOB_H_ | 5 #ifndef NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ |
| 6 #define NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ | 6 #define NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "net/base/completion_callback.h" | 11 #include "net/base/completion_callback.h" |
| 12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
| 13 #include "net/url_request/url_request_job.h" | 13 #include "net/url_request/url_request_job.h" |
| 14 | 14 |
| 15 namespace net { | 15 namespace net { |
| 16 | 16 |
| 17 class URLRequest; | 17 class URLRequest; |
| 18 | 18 |
| 19 class NET_EXPORT URLRequestSimpleJob : public URLRequestJob { | 19 class NET_EXPORT URLRequestSimpleJob : public URLRequestJob { |
| 20 public: | 20 public: |
| 21 explicit URLRequestSimpleJob(URLRequest* request); | 21 URLRequestSimpleJob(URLRequest* request, NetworkDelegate* network_delegate); |
| 22 | 22 |
| 23 virtual void Start() OVERRIDE; | 23 virtual void Start() OVERRIDE; |
| 24 virtual bool ReadRawData(IOBuffer* buf, | 24 virtual bool ReadRawData(IOBuffer* buf, |
| 25 int buf_size, | 25 int buf_size, |
| 26 int *bytes_read) OVERRIDE; | 26 int *bytes_read) OVERRIDE; |
| 27 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; | 27 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE; |
| 28 virtual bool GetCharset(std::string* charset) OVERRIDE; | 28 virtual bool GetCharset(std::string* charset) OVERRIDE; |
| 29 | 29 |
| 30 protected: | 30 protected: |
| 31 virtual ~URLRequestSimpleJob(); | 31 virtual ~URLRequestSimpleJob(); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 std::string mime_type_; | 54 std::string mime_type_; |
| 55 std::string charset_; | 55 std::string charset_; |
| 56 std::string data_; | 56 std::string data_; |
| 57 int data_offset_; | 57 int data_offset_; |
| 58 base::WeakPtrFactory<URLRequestSimpleJob> weak_factory_; | 58 base::WeakPtrFactory<URLRequestSimpleJob> weak_factory_; |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 } // namespace net | 61 } // namespace net |
| 62 | 62 |
| 63 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ | 63 #endif // NET_URL_REQUEST_URL_REQUEST_SIMPLE_JOB_H_ |
| OLD | NEW |