| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ | 5 #ifndef CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ |
| 6 #define CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ | 6 #define CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 void OnStartCompleted(int result); | 33 void OnStartCompleted(int result); |
| 34 void OnReadCompleted(int bytes_read); | 34 void OnReadCompleted(int bytes_read); |
| 35 | 35 |
| 36 // URLRequestJob | 36 // URLRequestJob |
| 37 virtual void Start(); | 37 virtual void Start(); |
| 38 virtual void Kill(); | 38 virtual void Kill(); |
| 39 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); | 39 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int* bytes_read); |
| 40 virtual bool GetMimeType(std::string* mime_type) const; | 40 virtual bool GetMimeType(std::string* mime_type) const; |
| 41 virtual bool GetCharset(std::string* charset); | 41 virtual bool GetCharset(std::string* charset); |
| 42 virtual void GetResponseInfo(net::HttpResponseInfo* info); | 42 virtual void GetResponseInfo(net::HttpResponseInfo* info); |
| 43 virtual int GetResponseCode(); | 43 virtual int GetResponseCode() const; |
| 44 virtual bool GetContentEncoding(std::string* encoding_type); | 44 virtual bool GetContentEncoding(std::string* encoding_type); |
| 45 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); | 45 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); |
| 46 | 46 |
| 47 // NotificationObserver | 47 // NotificationObserver |
| 48 virtual void Observe(NotificationType type, | 48 virtual void Observe(NotificationType type, |
| 49 const NotificationSource& source, | 49 const NotificationSource& source, |
| 50 const NotificationDetails& details); | 50 const NotificationDetails& details); |
| 51 private: | 51 private: |
| 52 void StartAsync(); | 52 void StartAsync(); |
| 53 void DetachPlugin(); | 53 void DetachPlugin(); |
| 54 | 54 |
| 55 scoped_ptr<ScopableCPRequest> cprequest_; | 55 scoped_ptr<ScopableCPRequest> cprequest_; |
| 56 ChromePluginLib* plugin_; | 56 ChromePluginLib* plugin_; |
| 57 bool got_headers_; | 57 bool got_headers_; |
| 58 net::IOBuffer* read_buffer_; | 58 net::IOBuffer* read_buffer_; |
| 59 int read_buffer_size_; | 59 int read_buffer_size_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptJob); | 61 DISALLOW_COPY_AND_ASSIGN(URLRequestInterceptJob); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 #endif // CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ | 64 #endif // CHROME_COMMON_NET_URL_REQUEST_INTERCEPT_JOB_H_ |
| OLD | NEW |