Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Unified Diff: content/browser/renderer_host/crypto_file_resource_handler.h

Issue 11266008: Fix certificate and keychain installation on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/crypto_file_resource_handler.h
diff --git a/content/browser/renderer_host/x509_user_cert_resource_handler.h b/content/browser/renderer_host/crypto_file_resource_handler.h
similarity index 75%
rename from content/browser/renderer_host/x509_user_cert_resource_handler.h
rename to content/browser/renderer_host/crypto_file_resource_handler.h
index 13dbba6427c381eed2258cdda4d79fe50b80c938..55cc84c93837ddf0dde586c23ca995048c59664f 100644
--- a/content/browser/renderer_host/x509_user_cert_resource_handler.h
+++ b/content/browser/renderer_host/crypto_file_resource_handler.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef CONTENT_BROWSER_RENDERER_HOST_X509_USER_CERT_RESOURCE_HANDLER_H_
-#define CONTENT_BROWSER_RENDERER_HOST_X509_USER_CERT_RESOURCE_HANDLER_H_
+#ifndef CONTENT_BROWSER_RENDERER_HOST_CRYPTO_FILE_RESOURCE_HANDLER_H_
+#define CONTENT_BROWSER_RENDERER_HOST_CRYPTO_FILE_RESOURCE_HANDLER_H_
#include <string>
#include <utility>
@@ -14,6 +14,7 @@
#include "base/memory/ref_counted.h"
#include "content/browser/renderer_host/resource_handler.h"
#include "googleurl/src/gurl.h"
+#include "net/base/mime_util.h"
namespace net {
class IOBuffer;
@@ -23,16 +24,18 @@ class URLRequestStatus;
namespace content {
-// This class handles the "application/x-x509-user-cert" mime-type
-// which is a certificate generated by a CA, typically after a previous
-// <keygen> form post.
+// This class handles the cryptographics mime-types supported by
+// net::IsSupportedCryptoMimeType(mime_type). These typically corresponds
+// to X509 User certificates, but also on some platforms, to
+// X509 CA certificates and PKCS#12 keychains.
+//
-class X509UserCertResourceHandler : public ResourceHandler {
+class CryptoFileResourceHandler : public ResourceHandler {
public:
- X509UserCertResourceHandler(net::URLRequest* request,
- int render_process_host_id,
- int render_view_id);
- virtual ~X509UserCertResourceHandler();
+ CryptoFileResourceHandler(net::URLRequest* request,
+ int render_process_host_id,
+ int render_view_id);
+ virtual ~CryptoFileResourceHandler();
virtual bool OnUploadProgress(int request_id,
uint64 position,
@@ -81,15 +84,15 @@ class X509UserCertResourceHandler : public ResourceHandler {
size_t content_length_;
ContentVector buffer_;
scoped_refptr<net::IOBuffer> read_buffer_;
- scoped_refptr<net::IOBuffer> resource_buffer_; // Downloaded certificate.
+ scoped_refptr<net::IOBuffer> resource_buffer_; // Downloaded file.
// The id of the |RenderProcessHost| which started the download.
int render_process_host_id_;
// The id of the |RenderView| which started the download.
int render_view_id_;
-
- DISALLOW_COPY_AND_ASSIGN(X509UserCertResourceHandler);
+ net::CryptoFileType file_type_;
+ DISALLOW_COPY_AND_ASSIGN(CryptoFileResourceHandler);
};
} // namespace content
-#endif // CONTENT_BROWSER_RENDERER_HOST_X509_USER_CERT_RESOURCE_HANDLER_H_
+#endif // CONTENT_BROWSER_RENDERER_HOST_CRYPTO_FILE_RESOURCE_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698