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

Side by Side Diff: chrome/browser/sync/profile_sync_service_android.h

Issue 551843003: Persist Directory to disk when the app is backgrounded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a thread check and fix a comment. Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ 5 #ifndef CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_
6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ 6 #define CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_
7 7
8 #include <jni.h> 8 #include <jni.h>
9 #include <map> 9 #include <map>
10 10
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 // Called from Java when the user manually disables sync 54 // Called from Java when the user manually disables sync
55 void DisableSync(JNIEnv* env, jobject obj); 55 void DisableSync(JNIEnv* env, jobject obj);
56 56
57 // Called from Java when the user signs in to Chrome. Starts up sync. 57 // Called from Java when the user signs in to Chrome. Starts up sync.
58 void SignInSync(JNIEnv* env, jobject obj); 58 void SignInSync(JNIEnv* env, jobject obj);
59 59
60 // Called from Java when the user signs out of Chrome 60 // Called from Java when the user signs out of Chrome
61 void SignOutSync(JNIEnv* env, jobject obj); 61 void SignOutSync(JNIEnv* env, jobject obj);
62 62
63 // Called from Java when we get a signal that the Directory should be saved.
64 void FlushDirectory(JNIEnv* env, jobject obj);
65
63 // Returns a string version of browser_sync::SyncBackendHost::StatusSummary 66 // Returns a string version of browser_sync::SyncBackendHost::StatusSummary
64 base::android::ScopedJavaLocalRef<jstring> QuerySyncStatusSummary( 67 base::android::ScopedJavaLocalRef<jstring> QuerySyncStatusSummary(
65 JNIEnv* env, jobject obj); 68 JNIEnv* env, jobject obj);
66 69
67 // Called from Java early during startup to ensure we use the correct 70 // Called from Java early during startup to ensure we use the correct
68 // unique machine tag in session sync. Returns true if the machine tag was 71 // unique machine tag in session sync. Returns true if the machine tag was
69 // succesfully set. 72 // succesfully set.
70 // This must be called before the |SessionModelAssociator| is initialized. 73 // This must be called before the |SessionModelAssociator| is initialized.
71 jboolean SetSyncSessionsId(JNIEnv* env, jobject obj, jstring tag); 74 jboolean SetSyncSessionsId(JNIEnv* env, jobject obj, jstring tag);
72 75
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 247
245 // The invalidation API spec allows for the possibility of redundant 248 // The invalidation API spec allows for the possibility of redundant
246 // invalidations, so keep track of the max versions and drop 249 // invalidations, so keep track of the max versions and drop
247 // invalidations with old versions. 250 // invalidations with old versions.
248 ObjectIdVersionMap max_invalidation_versions_; 251 ObjectIdVersionMap max_invalidation_versions_;
249 252
250 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); 253 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid);
251 }; 254 };
252 255
253 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ 256 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698