Index: chrome/browser/sync/profile_sync_service_android.cc |
diff --git a/chrome/browser/sync/profile_sync_service_android.cc b/chrome/browser/sync/profile_sync_service_android.cc |
index b391e897545c00bf6803e9da225762b2dbacebdc..bdc4143cc0abf9394e92097d792f3ee03049c123 100644 |
--- a/chrome/browser/sync/profile_sync_service_android.cc |
+++ b/chrome/browser/sync/profile_sync_service_android.cc |
@@ -95,6 +95,7 @@ ProfileSyncServiceAndroid::~ProfileSyncServiceAndroid() { |
} |
void ProfileSyncServiceAndroid::SendNudgeNotification( |
+ int object_source, |
const std::string& str_object_id, |
int64 version, |
const std::string& state) { |
@@ -103,9 +104,11 @@ void ProfileSyncServiceAndroid::SendNudgeNotification( |
// TODO(nileshagrawal): Merge this with ChromeInvalidationClient::Invalidate. |
// Construct the ModelTypeStateMap and send it over with the notification. |
invalidation::ObjectId object_id( |
- ipc::invalidation::ObjectSource::CHROME_SYNC, |
+ object_source, |
str_object_id); |
- if (version != ipc::invalidation::Constants::UNKNOWN) { |
+ if (version == ipc::invalidation::Constants::UNKNOWN) { |
+ version = syncer::Invalidation::kUnknownVersion; |
+ } else { |
ObjectIdVersionMap::iterator it = |
max_invalidation_versions_.find(object_id); |
if ((it != max_invalidation_versions_.end()) && |
@@ -474,12 +477,13 @@ ScopedJavaLocalRef<jstring> ProfileSyncServiceAndroid::GetAboutInfoForTest( |
void ProfileSyncServiceAndroid::NudgeSyncer(JNIEnv* env, |
jobject obj, |
+ jint objectSource, |
jstring objectId, |
jlong version, |
jstring state) { |
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
- SendNudgeNotification(ConvertJavaStringToUTF8(env, objectId), version, |
- ConvertJavaStringToUTF8(env, state)); |
+ SendNudgeNotification(objectSource, ConvertJavaStringToUTF8(env, objectId), |
+ version, ConvertJavaStringToUTF8(env, state)); |
} |
void ProfileSyncServiceAndroid::NudgeSyncerForAllTypes(JNIEnv* env, |