| 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 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // This class handles certificate mime types such as: | 23 // This class handles certificate mime types such as: |
| 24 // - "application/x-x509-user-cert" | 24 // - "application/x-x509-user-cert" |
| 25 // - "application/x-x509-ca-cert" | 25 // - "application/x-x509-ca-cert" |
| 26 // - "application/x-pkcs12" | 26 // - "application/x-pkcs12" |
| 27 // | 27 // |
| 28 class CertificateResourceHandler : public ResourceHandler { | 28 class CertificateResourceHandler : public ResourceHandler { |
| 29 public: | 29 public: |
| 30 explicit CertificateResourceHandler(net::URLRequest* request); | 30 explicit CertificateResourceHandler(net::URLRequest* request); |
| 31 ~CertificateResourceHandler() override; | 31 ~CertificateResourceHandler() override; |
| 32 | 32 |
| 33 bool OnUploadProgress(uint64 position, uint64 size) override; | |
| 34 | |
| 35 // Not needed, as this event handler ought to be the final resource. | 33 // Not needed, as this event handler ought to be the final resource. |
| 36 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, | 34 bool OnRequestRedirected(const net::RedirectInfo& redirect_info, |
| 37 ResourceResponse* resp, | 35 ResourceResponse* resp, |
| 38 bool* defer) override; | 36 bool* defer) override; |
| 39 | 37 |
| 40 // Check if this indeed an X509 cert. | 38 // Check if this indeed an X509 cert. |
| 41 bool OnResponseStarted(ResourceResponse* resp, bool* defer) override; | 39 bool OnResponseStarted(ResourceResponse* resp, bool* defer) override; |
| 42 | 40 |
| 43 // Pass-through implementation. | 41 // Pass-through implementation. |
| 44 bool OnWillStart(const GURL& url, bool* defer) override; | 42 bool OnWillStart(const GURL& url, bool* defer) override; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 65 private: | 63 private: |
| 66 scoped_refptr<net::GrowableIOBuffer> buffer_; | 64 scoped_refptr<net::GrowableIOBuffer> buffer_; |
| 67 net::CertificateMimeType cert_type_; | 65 net::CertificateMimeType cert_type_; |
| 68 | 66 |
| 69 DISALLOW_COPY_AND_ASSIGN(CertificateResourceHandler); | 67 DISALLOW_COPY_AND_ASSIGN(CertificateResourceHandler); |
| 70 }; | 68 }; |
| 71 | 69 |
| 72 } // namespace content | 70 } // namespace content |
| 73 | 71 |
| 74 #endif // CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ | 72 #endif // CONTENT_BROWSER_LOADER_CERTIFICATE_RESOURCE_HANDLER_H_ |
| OLD | NEW |