// This method should be called once right after contructing the object.
void Init();
- // Called from Java when we need to nudge native syncer. The |objectSource|,
- // |objectId|, |version| and |payload| values should come from an
- // invalidation.
- void NudgeSyncer(JNIEnv* env,
- jobject obj,
- jint objectSource,
- jstring objectId,
- jlong version,
- jstring payload);
-
- // Called from Java when we need to nudge native syncer but have lost state on
- // which types have changed.
- void NudgeSyncerForAllTypes(JNIEnv* env, jobject obj);
-
// Called from Java when the user manually enables sync
void EnableSync(JNIEnv* env, jobject obj);
// Called from Java when the user signs out of Chrome
void SignOutSync(JNIEnv* env, jobject obj);
+ // Called from Java when we get a signal that the Directory should be saved.
+ void FlushDirectory(JNIEnv* env, jobject obj);
+
// Returns a string version of browser_sync::SyncBackendHost::StatusSummary
base::android::ScopedJavaLocalRef<jstring> QuerySyncStatusSummary(
JNIEnv* env, jobject obj);
jint GetAuthError(JNIEnv* env, jobject obj);
// ProfileSyncServiceObserver:
- virtual void OnStateChanged() OVERRIDE;
+ virtual void OnStateChanged() override;
// Returns a timestamp for when a sync was last executed. The return value is
// the internal value of base::Time.
virtual ~ProfileSyncServiceAndroid();
// Remove observers to profile sync service.
void RemoveObserver();
- // Called from Java when we need to nudge native syncer. The |object_source|,
- // |objectId|, |version| and |payload| values should come from an
- // invalidation.
- void SendNudgeNotification(int object_source,
- const std::string& str_object_id,
- int64 version,
- const std::string& payload);
Profile* profile_;
ProfileSyncService* sync_service_;
// Java-side ProfileSyncService object.
JavaObjectWeakGlobalRef weak_java_profile_sync_service_;
- // The invalidation API spec allows for the possibility of redundant
- // invalidations, so keep track of the max versions and drop
- // invalidations with old versions.
- ObjectIdVersionMap max_invalidation_versions_;
-
DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid);
};