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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java

Issue 22914014: Add more control over sync for Chromium testshell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added comments for ProfileSyncServiceAndroid Created 7 years, 3 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: chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java b/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
index f202ef7024e47d0b58cd4ec3dfa2f3ce562e4a53..4e846c0d8e860554c9dcb8e3a47106c55b76dba4 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/sync/ProfileSyncService.java
@@ -489,6 +489,16 @@ public class ProfileSyncService {
nativeDisableSync(mNativeProfileSyncServiceAndroid);
}
+ /**
+ * Returns the time when the last sync cycle was completed.
+ *
+ * @return The difference measured in microseconds, between last sync cycle completion time
+ * and 1 January 1970 00:00:00 UTC.
+ */
+ public long getLastSyncedTimeForTest() {
+ return nativeGetLastSyncedTimeForTest(mNativeProfileSyncServiceAndroid);
+ }
+
// Native methods
private native void nativeNudgeSyncer(
int nativeProfileSyncServiceAndroid, String objectId, long version, String payload);
@@ -539,4 +549,5 @@ public class ProfileSyncService {
private native boolean nativeHasKeepEverythingSynced(int nativeProfileSyncServiceAndroid);
private native boolean nativeHasUnrecoverableError(int nativeProfileSyncServiceAndroid);
private native String nativeGetAboutInfoForTest(int nativeProfileSyncServiceAndroid);
+ private native long nativeGetLastSyncedTimeForTest(int nativeProfileSyncServiceAndroid);
}

Powered by Google App Engine
This is Rietveld 408576698