| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CONTENT_BROWSER_STREAMS_STREAM_URL_REQUEST_JOB_H_ | 5 #ifndef CONTENT_BROWSER_STREAMS_STREAM_URL_REQUEST_JOB_H_ |
| 6 #define CONTENT_BROWSER_STREAMS_STREAM_URL_REQUEST_JOB_H_ | 6 #define CONTENT_BROWSER_STREAMS_STREAM_URL_REQUEST_JOB_H_ |
| 7 | 7 |
| 8 #include "net/http/http_status_code.h" | 8 #include "net/http/http_status_code.h" |
| 9 #include "net/url_request/url_request_job.h" | 9 #include "net/url_request/url_request_job.h" |
| 10 #include "content/browser/streams/stream_read_observer.h" | 10 #include "content/browser/streams/stream_read_observer.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 StreamURLRequestJob(net::URLRequest* request, | 22 StreamURLRequestJob(net::URLRequest* request, |
| 23 net::NetworkDelegate* network_delegate, | 23 net::NetworkDelegate* network_delegate, |
| 24 scoped_refptr<Stream> stream); | 24 scoped_refptr<Stream> stream); |
| 25 | 25 |
| 26 // StreamObserver methods. | 26 // StreamObserver methods. |
| 27 void OnDataAvailable(Stream* stream) override; | 27 void OnDataAvailable(Stream* stream) override; |
| 28 | 28 |
| 29 // net::URLRequestJob methods. | 29 // net::URLRequestJob methods. |
| 30 void Start() override; | 30 void Start() override; |
| 31 void Kill() override; | 31 void Kill() override; |
| 32 bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read) override; | 32 int ReadRawData(net::IOBuffer* buf, int buf_size) override; |
| 33 bool GetMimeType(std::string* mime_type) const override; | 33 bool GetMimeType(std::string* mime_type) const override; |
| 34 void GetResponseInfo(net::HttpResponseInfo* info) override; | 34 void GetResponseInfo(net::HttpResponseInfo* info) override; |
| 35 int GetResponseCode() const override; | 35 int GetResponseCode() const override; |
| 36 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; | 36 void SetExtraRequestHeaders(const net::HttpRequestHeaders& headers) override; |
| 37 | 37 |
| 38 protected: | 38 protected: |
| 39 ~StreamURLRequestJob() override; | 39 ~StreamURLRequestJob() override; |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 void DidStart(); | 42 void DidStart(); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 55 bool request_failed_; | 55 bool request_failed_; |
| 56 | 56 |
| 57 base::WeakPtrFactory<StreamURLRequestJob> weak_factory_; | 57 base::WeakPtrFactory<StreamURLRequestJob> weak_factory_; |
| 58 | 58 |
| 59 DISALLOW_COPY_AND_ASSIGN(StreamURLRequestJob); | 59 DISALLOW_COPY_AND_ASSIGN(StreamURLRequestJob); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace content | 62 } // namespace content |
| 63 | 63 |
| 64 #endif // CONTENT_BROWSER_STREAMS_STREAM_URL_REQUEST_JOB_H_ | 64 #endif // CONTENT_BROWSER_STREAMS_STREAM_URL_REQUEST_JOB_H_ |
| OLD | NEW |