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

Unified Diff: chrome/browser/sync/profile_sync_service_android.cc

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
« no previous file with comments | « chrome/browser/sync/profile_sync_service_android.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_android.cc
diff --git a/chrome/browser/sync/profile_sync_service_android.cc b/chrome/browser/sync/profile_sync_service_android.cc
index 8894c781c93eaf12b2de285d84e8d7ee3b52a91a..daa4e179a26025a33c7403a639b9cb8a2deaa0cb 100644
--- a/chrome/browser/sync/profile_sync_service_android.cc
+++ b/chrome/browser/sync/profile_sync_service_android.cc
@@ -471,6 +471,15 @@ ScopedJavaLocalRef<jstring> ProfileSyncServiceAndroid::GetAboutInfoForTest(
return ConvertUTF8ToJavaString(env, about_info_json);
}
+jlong ProfileSyncServiceAndroid::GetLastSyncedTimeForTest(
+ JNIEnv* env, jobject obj) {
+ // Use profile preferences here instead of SyncPrefs to avoid an extra
+ // conversion, since SyncPrefs::GetLastSyncedTime() converts the stored value
+ // to to base::Time.
+ return static_cast<jlong>(
+ profile_->GetPrefs()->GetInt64(prefs::kSyncLastSyncedTime));
+}
+
void ProfileSyncServiceAndroid::NudgeSyncer(JNIEnv* env,
jobject obj,
jstring objectId,
« no previous file with comments | « chrome/browser/sync/profile_sync_service_android.h ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698