| 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 CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ |
| 6 #define CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ | 6 #define CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Check if this indeed an X509 cert. | 47 // Check if this indeed an X509 cert. |
| 48 virtual bool OnResponseStarted(int request_id, | 48 virtual bool OnResponseStarted(int request_id, |
| 49 ResourceResponse* resp, | 49 ResourceResponse* resp, |
| 50 bool* defer) OVERRIDE; | 50 bool* defer) OVERRIDE; |
| 51 | 51 |
| 52 // Pass-through implementation. | 52 // Pass-through implementation. |
| 53 virtual bool OnWillStart(int request_id, | 53 virtual bool OnWillStart(int request_id, |
| 54 const GURL& url, | 54 const GURL& url, |
| 55 bool* defer) OVERRIDE; | 55 bool* defer) OVERRIDE; |
| 56 | 56 |
| 57 // Pass-through implementation. |
| 58 virtual bool OnBeforeNetworkStart(int request_id, |
| 59 const GURL& url, |
| 60 bool* defer) OVERRIDE; |
| 61 |
| 57 // Create a new buffer to store received data. | 62 // Create a new buffer to store received data. |
| 58 virtual bool OnWillRead(int request_id, | 63 virtual bool OnWillRead(int request_id, |
| 59 scoped_refptr<net::IOBuffer>* buf, | 64 scoped_refptr<net::IOBuffer>* buf, |
| 60 int* buf_size, | 65 int* buf_size, |
| 61 int min_size) OVERRIDE; | 66 int min_size) OVERRIDE; |
| 62 | 67 |
| 63 // A read was completed, maybe allocate a new buffer for further data. | 68 // A read was completed, maybe allocate a new buffer for further data. |
| 64 virtual bool OnReadCompleted(int request_id, | 69 virtual bool OnReadCompleted(int request_id, |
| 65 int bytes_read, | 70 int bytes_read, |
| 66 bool* defer) OVERRIDE; | 71 bool* defer) OVERRIDE; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 85 ContentVector buffer_; | 90 ContentVector buffer_; |
| 86 scoped_refptr<net::IOBuffer> read_buffer_; | 91 scoped_refptr<net::IOBuffer> read_buffer_; |
| 87 scoped_refptr<net::IOBuffer> resource_buffer_; // Downloaded certificate. | 92 scoped_refptr<net::IOBuffer> resource_buffer_; // Downloaded certificate. |
| 88 net::CertificateMimeType cert_type_; | 93 net::CertificateMimeType cert_type_; |
| 89 DISALLOW_COPY_AND_ASSIGN(CertificateResourceHandler); | 94 DISALLOW_COPY_AND_ASSIGN(CertificateResourceHandler); |
| 90 }; | 95 }; |
| 91 | 96 |
| 92 } // namespace content | 97 } // namespace content |
| 93 | 98 |
| 94 #endif // CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ | 99 #endif // CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ |
| OLD | NEW |