| 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 19 matching lines...) Expand all Loading... |
| 30 // - "application/x-pkcs12" | 30 // - "application/x-pkcs12" |
| 31 // | 31 // |
| 32 class CertificateResourceHandler : public ResourceHandler { | 32 class CertificateResourceHandler : public ResourceHandler { |
| 33 public: | 33 public: |
| 34 explicit CertificateResourceHandler(net::URLRequest* request); | 34 explicit CertificateResourceHandler(net::URLRequest* request); |
| 35 virtual ~CertificateResourceHandler(); | 35 virtual ~CertificateResourceHandler(); |
| 36 | 36 |
| 37 virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE; | 37 virtual bool OnUploadProgress(uint64 position, uint64 size) OVERRIDE; |
| 38 | 38 |
| 39 // Not needed, as this event handler ought to be the final resource. | 39 // Not needed, as this event handler ought to be the final resource. |
| 40 virtual bool OnRequestRedirected(const GURL& url, | 40 virtual bool OnRequestRedirected(const net::RedirectInfo& redirect_info, |
| 41 ResourceResponse* resp, | 41 ResourceResponse* resp, |
| 42 bool* defer) OVERRIDE; | 42 bool* defer) OVERRIDE; |
| 43 | 43 |
| 44 // Check if this indeed an X509 cert. | 44 // Check if this indeed an X509 cert. |
| 45 virtual bool OnResponseStarted(ResourceResponse* resp, | 45 virtual bool OnResponseStarted(ResourceResponse* resp, |
| 46 bool* defer) OVERRIDE; | 46 bool* defer) OVERRIDE; |
| 47 | 47 |
| 48 // Pass-through implementation. | 48 // Pass-through implementation. |
| 49 virtual bool OnWillStart(const GURL& url, bool* defer) OVERRIDE; | 49 virtual bool OnWillStart(const GURL& url, bool* defer) OVERRIDE; |
| 50 | 50 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 78 ContentVector buffer_; | 78 ContentVector buffer_; |
| 79 scoped_refptr<net::IOBuffer> read_buffer_; | 79 scoped_refptr<net::IOBuffer> read_buffer_; |
| 80 scoped_refptr<net::IOBuffer> resource_buffer_; // Downloaded certificate. | 80 scoped_refptr<net::IOBuffer> resource_buffer_; // Downloaded certificate. |
| 81 net::CertificateMimeType cert_type_; | 81 net::CertificateMimeType cert_type_; |
| 82 DISALLOW_COPY_AND_ASSIGN(CertificateResourceHandler); | 82 DISALLOW_COPY_AND_ASSIGN(CertificateResourceHandler); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace content | 85 } // namespace content |
| 86 | 86 |
| 87 #endif // CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ | 87 #endif // CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ |
| OLD | NEW |