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

Unified Diff: chrome/browser/sync/profile_sync_service_android.cc

Issue 23643002: Enable invalidations for arbitrary objects on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/sync/profile_sync_service_android.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 daa4e179a26025a33c7403a639b9cb8a2deaa0cb..2eb88ea45c7179c14ac800c579f1c1b558fbff0e 100644
--- a/chrome/browser/sync/profile_sync_service_android.cc
+++ b/chrome/browser/sync/profile_sync_service_android.cc
@@ -94,6 +94,7 @@ ProfileSyncServiceAndroid::~ProfileSyncServiceAndroid() {
}
void ProfileSyncServiceAndroid::SendNudgeNotification(
+ int object_source,
const std::string& str_object_id,
int64 version,
const std::string& state) {
@@ -102,9 +103,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()) &&
@@ -482,12 +485,13 @@ jlong ProfileSyncServiceAndroid::GetLastSyncedTimeForTest(
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,
« no previous file with comments | « chrome/browser/sync/profile_sync_service_android.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698