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

Side by Side Diff: net/android/java/src/org/chromium/net/AndroidKeyStoreRemote.java

Issue 164053004: Refactor AndroidKeyStore to allow remote key handling. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to abstract AndroidPrivateKey. Created 6 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 package org.chromium.net;
6
7 /**
8 * TODO(ppi)
9 */
10 public abstract class AndroidKeyStoreRemote implements AndroidKeyStore {
11 private static final String TAG = "AndroidKeyStoreRemote";
12
13 protected static class RemotePrivateKey implements AndroidPrivateKey {
14 // Alias of the key on a remote store.
15 final String mHandle;
16 // Key store handling this key.
17 final AndroidKeyStoreRemote mStore;
18
19 RemotePrivateKey(String handle, AndroidKeyStoreRemote store) {
20 mHandle = handle;
21 mStore = store;
22 }
23
24 public String getHandle() {
25 return mHandle;
26 }
27
28 @Override
29 public AndroidKeyStore getKeyStore() {
30 return mStore;
31 }
32 }
33
34 public AndroidPrivateKey createKey(String handle) {
35 return new RemotePrivateKey(handle, this);
36 }
37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698