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 |
11 #include "base/android/jni_helper.h" | 11 #include "base/android/jni_helper.h" |
12 #include "base/callback.h" | 12 #include "base/callback.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "chrome/browser/sync/profile_sync_service_observer.h" | 15 #include "chrome/browser/sync/profile_sync_service_observer.h" |
16 #include "chrome/browser/sync/sync_prefs.h" | 16 #include "components/sync_driver/sync_prefs.h" |
17 #include "google/cacheinvalidation/include/types.h" | 17 #include "google/cacheinvalidation/include/types.h" |
18 #include "google_apis/gaia/google_service_auth_error.h" | 18 #include "google_apis/gaia/google_service_auth_error.h" |
19 | 19 |
20 class Profile; | 20 class Profile; |
21 class ProfileSyncService; | 21 class ProfileSyncService; |
22 | 22 |
23 // Android wrapper of the ProfileSyncService which provides access from the Java | 23 // Android wrapper of the ProfileSyncService which provides access from the Java |
24 // layer. Note that on Android, there's only a single profile, and therefore | 24 // layer. Note that on Android, there's only a single profile, and therefore |
25 // a single instance of this wrapper. The name of the Java class is | 25 // a single instance of this wrapper. The name of the Java class is |
26 // ProfileSyncService. | 26 // ProfileSyncService. |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 // invalidation. | 215 // invalidation. |
216 void SendNudgeNotification(int object_source, | 216 void SendNudgeNotification(int object_source, |
217 const std::string& str_object_id, | 217 const std::string& str_object_id, |
218 int64 version, | 218 int64 version, |
219 const std::string& payload); | 219 const std::string& payload); |
220 | 220 |
221 Profile* profile_; | 221 Profile* profile_; |
222 ProfileSyncService* sync_service_; | 222 ProfileSyncService* sync_service_; |
223 // The class that handles getting, setting, and persisting sync | 223 // The class that handles getting, setting, and persisting sync |
224 // preferences. | 224 // preferences. |
225 scoped_ptr<browser_sync::SyncPrefs> sync_prefs_; | 225 scoped_ptr<sync_driver::SyncPrefs> sync_prefs_; |
226 | 226 |
227 // Java-side ProfileSyncService object. | 227 // Java-side ProfileSyncService object. |
228 JavaObjectWeakGlobalRef weak_java_profile_sync_service_; | 228 JavaObjectWeakGlobalRef weak_java_profile_sync_service_; |
229 | 229 |
230 // The invalidation API spec allows for the possibility of redundant | 230 // The invalidation API spec allows for the possibility of redundant |
231 // invalidations, so keep track of the max versions and drop | 231 // invalidations, so keep track of the max versions and drop |
232 // invalidations with old versions. | 232 // invalidations with old versions. |
233 ObjectIdVersionMap max_invalidation_versions_; | 233 ObjectIdVersionMap max_invalidation_versions_; |
234 | 234 |
235 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); | 235 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); |
236 }; | 236 }; |
237 | 237 |
238 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ | 238 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ |
OLD | NEW |