This repository was archived by the owner on Apr 3, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +19
-0
lines changed
android/java/src/org/chromium/chrome/browser/sync Expand file tree Collapse file tree 3 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -236,6 +236,14 @@ public boolean hasExplicitPassphraseTime() {
236
236
return nativeHasExplicitPassphraseTime (mNativeProfileSyncServiceAndroid );
237
237
}
238
238
239
+ /**
240
+ * Returns the current explicit passphrase time in milliseconds since epoch.
241
+ */
242
+ public long getExplicitPassphraseTime () {
243
+ assert isSyncInitialized ();
244
+ return nativeGetExplicitPassphraseTime (mNativeProfileSyncServiceAndroid );
245
+ }
246
+
239
247
public String getSyncEnterGooglePassphraseBodyWithDateText () {
240
248
assert isSyncInitialized ();
241
249
return nativeGetSyncEnterGooglePassphraseBodyWithDateText (mNativeProfileSyncServiceAndroid );
@@ -585,6 +593,7 @@ private native void nativeSetEncryptionPassphrase(
585
593
private native boolean nativeIsCryptographerReady (long nativeProfileSyncServiceAndroid );
586
594
private native int nativeGetPassphraseType (long nativeProfileSyncServiceAndroid );
587
595
private native boolean nativeHasExplicitPassphraseTime (long nativeProfileSyncServiceAndroid );
596
+ private native long nativeGetExplicitPassphraseTime (long nativeProfileSyncServiceAndroid );
588
597
private native String nativeGetSyncEnterGooglePassphraseBodyWithDateText (
589
598
long nativeProfileSyncServiceAndroid );
590
599
private native String nativeGetSyncEnterCustomPassphraseBodyWithDateText (
Original file line number Diff line number Diff line change @@ -257,6 +257,13 @@ jboolean ProfileSyncServiceAndroid::HasExplicitPassphraseTime(
257
257
return !passphrase_time.is_null ();
258
258
}
259
259
260
+ jlong ProfileSyncServiceAndroid::GetExplicitPassphraseTime (
261
+ JNIEnv* env, jobject) {
262
+ DCHECK (BrowserThread::CurrentlyOn (BrowserThread::UI));
263
+ base::Time passphrase_time = sync_service_->GetExplicitPassphraseTime ();
264
+ return passphrase_time.ToJavaTime ();
265
+ }
266
+
260
267
ScopedJavaLocalRef<jstring>
261
268
ProfileSyncServiceAndroid::GetSyncEnterGooglePassphraseBodyWithDateText (
262
269
JNIEnv* env, jobject) {
Original file line number Diff line number Diff line change @@ -112,6 +112,9 @@ class ProfileSyncServiceAndroid : public ProfileSyncServiceObserver {
112
112
// Returns true if the current explicit passphrase time is defined.
113
113
jboolean HasExplicitPassphraseTime (JNIEnv* env, jobject);
114
114
115
+ // Returns the current explicit passphrase time.
116
+ jlong GetExplicitPassphraseTime (JNIEnv* env, jobject);
117
+
115
118
base::android::ScopedJavaLocalRef<jstring>
116
119
GetSyncEnterGooglePassphraseBodyWithDateText (
117
120
JNIEnv* env, jobject);
You can’t perform that action at this time.
0 commit comments