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

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

Issue 457883002: Use Sync FakeServer in Android tests via custom APK (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 // (GoogleServiceAuthError.State). 191 // (GoogleServiceAuthError.State).
192 jint GetAuthError(JNIEnv* env, jobject obj); 192 jint GetAuthError(JNIEnv* env, jobject obj);
193 193
194 // ProfileSyncServiceObserver: 194 // ProfileSyncServiceObserver:
195 virtual void OnStateChanged() OVERRIDE; 195 virtual void OnStateChanged() OVERRIDE;
196 196
197 // Returns a timestamp for when a sync was last executed. The return value is 197 // Returns a timestamp for when a sync was last executed. The return value is
198 // the internal value of base::Time. 198 // the internal value of base::Time.
199 jlong GetLastSyncedTimeForTest(JNIEnv* env, jobject obj); 199 jlong GetLastSyncedTimeForTest(JNIEnv* env, jobject obj);
200 200
201 // Overrides ProfileSyncService's NetworkResources object. This is used to
202 // set up the Sync FakeServer for testing.
203 void OverrideNetworkResourcesForTest(JNIEnv* env,
204 jobject obj,
205 jlong network_resources);
206
201 static ProfileSyncServiceAndroid* GetProfileSyncServiceAndroid(); 207 static ProfileSyncServiceAndroid* GetProfileSyncServiceAndroid();
202 208
203 // Registers the ProfileSyncServiceAndroid's native methods through JNI. 209 // Registers the ProfileSyncServiceAndroid's native methods through JNI.
204 static bool Register(JNIEnv* env); 210 static bool Register(JNIEnv* env);
205 211
206 private: 212 private:
207 typedef std::map<invalidation::ObjectId, 213 typedef std::map<invalidation::ObjectId,
208 int64, 214 int64,
209 syncer::ObjectIdLessThan> ObjectIdVersionMap; 215 syncer::ObjectIdLessThan> ObjectIdVersionMap;
210 216
(...skipping 19 matching lines...) Expand all
230 236
231 // The invalidation API spec allows for the possibility of redundant 237 // The invalidation API spec allows for the possibility of redundant
232 // invalidations, so keep track of the max versions and drop 238 // invalidations, so keep track of the max versions and drop
233 // invalidations with old versions. 239 // invalidations with old versions.
234 ObjectIdVersionMap max_invalidation_versions_; 240 ObjectIdVersionMap max_invalidation_versions_;
235 241
236 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid); 242 DISALLOW_COPY_AND_ASSIGN(ProfileSyncServiceAndroid);
237 }; 243 };
238 244
239 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_ 245 #endif // CHROME_BROWSER_SYNC_PROFILE_SYNC_SERVICE_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698