OLD | NEW |
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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 base::android::ScopedJavaLocalRef<jstring> GetAboutInfoForTest(JNIEnv* env, | 186 base::android::ScopedJavaLocalRef<jstring> GetAboutInfoForTest(JNIEnv* env, |
187 jobject obj); | 187 jobject obj); |
188 | 188 |
189 // Returns the integer value corresponding to the current auth error state | 189 // Returns the integer value corresponding to the current auth error state |
190 // (GoogleServiceAuthError.State). | 190 // (GoogleServiceAuthError.State). |
191 jint GetAuthError(JNIEnv* env, jobject obj); | 191 jint GetAuthError(JNIEnv* env, jobject obj); |
192 | 192 |
193 // ProfileSyncServiceObserver: | 193 // ProfileSyncServiceObserver: |
194 virtual void OnStateChanged() OVERRIDE; | 194 virtual void OnStateChanged() OVERRIDE; |
195 | 195 |
| 196 // Returns a timestamp for when a sync was last executed. The return value is |
| 197 // the internal value of base::Time. |
| 198 jlong GetLastSyncedTimeForTest(JNIEnv* env, jobject obj); |
| 199 |
196 static ProfileSyncServiceAndroid* GetProfileSyncServiceAndroid(); | 200 static ProfileSyncServiceAndroid* GetProfileSyncServiceAndroid(); |
197 | 201 |
198 // Registers the ProfileSyncServiceAndroid's native methods through JNI. | 202 // Registers the ProfileSyncServiceAndroid's native methods through JNI. |
199 static bool Register(JNIEnv* env); | 203 static bool Register(JNIEnv* env); |
200 | 204 |
201 private: | 205 private: |
202 typedef std::map<invalidation::ObjectId, | 206 typedef std::map<invalidation::ObjectId, |
203 int64, | 207 int64, |
204 syncer::ObjectIdLessThan> ObjectIdVersionMap; | 208 syncer::ObjectIdLessThan> ObjectIdVersionMap; |
205 | 209 |
(...skipping 17 matching lines...) Expand all Loading... |
223 | 227 |
224 // The invalidation API spec allows for the possibility of redundant | 228 // The invalidation API spec allows for the possibility of redundant |
225 // invalidations, so keep track of the max versions and drop | 229 // invalidations, so keep track of the max versions and drop |
226 // invalidations with old versions. | 230 // invalidations with old versions. |
227 ObjectIdVersionMap max_invalidation_versions_; | 231 ObjectIdVersionMap max_invalidation_versions_; |
228 | 232 |
229 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); | 233 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); |
230 }; | 234 }; |
231 | 235 |
232 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ | 236 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ |
OLD | NEW |