Index: net/android/java/src/org/chromium/net/AndroidKeyStoreRemote.java |
diff --git a/net/android/java/src/org/chromium/net/AndroidKeyStoreRemote.java b/net/android/java/src/org/chromium/net/AndroidKeyStoreRemote.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..034465ad788f7ca55d1662c4112b7928f374bb94 |
--- /dev/null |
+++ b/net/android/java/src/org/chromium/net/AndroidKeyStoreRemote.java |
@@ -0,0 +1,37 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.net; |
+ |
+/** |
+ * TODO(ppi) |
+ */ |
+public abstract class AndroidKeyStoreRemote implements AndroidKeyStore { |
+ private static final String TAG = "AndroidKeyStoreRemote"; |
+ |
+ protected static class RemotePrivateKey implements AndroidPrivateKey { |
+ // Alias of the key on a remote store. |
+ final String mHandle; |
+ // Key store handling this key. |
+ final AndroidKeyStoreRemote mStore; |
+ |
+ RemotePrivateKey(String handle, AndroidKeyStoreRemote store) { |
+ mHandle = handle; |
+ mStore = store; |
+ } |
+ |
+ public String getHandle() { |
+ return mHandle; |
+ } |
+ |
+ @Override |
+ public AndroidKeyStore getKeyStore() { |
+ return mStore; |
+ } |
+ } |
+ |
+ public AndroidPrivateKey createKey(String handle) { |
+ return new RemotePrivateKey(handle, this); |
+ } |
+} |