Commit 67017042 authored by Friedrich Horschig's avatar Friedrich Horschig Committed by Commit Bot

[PwdCheckAndroid] Add delete password to check and bridge API

This CL adds the wiring of the delete call to the native side. The
actual deleting does not happen yet.

Bug: 1108358, 1092444
Change-Id: Ibe312ca2eb5218188e8eefe3a064ad005a75b0d0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332825Reviewed-by: default avatarIoana Pandele <ioanap@chromium.org>
Commit-Queue: Friedrich [CET] <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#795381}
parent ff819726
...@@ -124,6 +124,10 @@ class PasswordCheckBridge { ...@@ -124,6 +124,10 @@ class PasswordCheckBridge {
mNativePasswordCheckBridge, credentials); mNativePasswordCheckBridge, credentials);
} }
void removeCredential(CompromisedCredential credential) {
PasswordCheckBridgeJni.get().removeCredential(mNativePasswordCheckBridge, credential);
}
/** /**
* Destroys its C++ counterpart. * Destroys its C++ counterpart.
*/ */
...@@ -146,6 +150,7 @@ class PasswordCheckBridge { ...@@ -146,6 +150,7 @@ class PasswordCheckBridge {
int getSavedPasswordsCount(long nativePasswordCheckBridge); int getSavedPasswordsCount(long nativePasswordCheckBridge);
void getCompromisedCredentials( void getCompromisedCredentials(
long nativePasswordCheckBridge, CompromisedCredential[] credentials); long nativePasswordCheckBridge, CompromisedCredential[] credentials);
void removeCredential(long nativePasswordCheckBridge, CompromisedCredential credentials);
void destroy(long nativePasswordCheckBridge); void destroy(long nativePasswordCheckBridge);
} }
} }
...@@ -76,7 +76,7 @@ class PasswordCheckImpl implements PasswordCheck, PasswordCheckObserver { ...@@ -76,7 +76,7 @@ class PasswordCheckImpl implements PasswordCheck, PasswordCheckObserver {
@Override @Override
public void removeCredential(CompromisedCredential credential) { public void removeCredential(CompromisedCredential credential) {
// TODO(crbug.com/1106726): Call native method through bridge. mPasswordCheckBridge.removeCredential(credential);
} }
@Override @Override
......
...@@ -43,6 +43,12 @@ void PasswordCheckBridge::GetCompromisedCredentials( ...@@ -43,6 +43,12 @@ void PasswordCheckBridge::GetCompromisedCredentials(
// TODO(crbug.com/1102025): implement this. // TODO(crbug.com/1102025): implement this.
} }
void PasswordCheckBridge::RemoveCredential(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& credential) {
// TODO(crbug.com/1108358): implement this.
}
void PasswordCheckBridge::Destroy(JNIEnv* env) { void PasswordCheckBridge::Destroy(JNIEnv* env) {
delete this; delete this;
} }
......
...@@ -35,6 +35,12 @@ class PasswordCheckBridge { ...@@ -35,6 +35,12 @@ class PasswordCheckBridge {
JNIEnv* env, JNIEnv* env,
const base::android::JavaParamRef<jobjectArray>& credentials); const base::android::JavaParamRef<jobjectArray>& credentials);
// Called by Java to remove a single compromised credentials from the password
// store.
void RemoveCredential(
JNIEnv* env,
const base::android::JavaParamRef<jobject>& credentials);
// Called by Java when the bridge is no longer needed. Destructs itself. // Called by Java when the bridge is no longer needed. Destructs itself.
void Destroy(JNIEnv* env); void Destroy(JNIEnv* env);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment