From 2d90b862c24858afc50fc3e485f8d13e7fffa99c Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Wed, 4 Apr 2012 13:13:24 -0700 Subject: [PATCH] Bug 742120 - History records incorrectly reconciled by title + URI, not just URI. r=nalexander --- .../android/AndroidBrowserHistoryRepositorySession.java | 2 +- .../base/sync/repositories/domain/HistoryRecord.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mobile/android/base/sync/repositories/android/AndroidBrowserHistoryRepositorySession.java b/mobile/android/base/sync/repositories/android/AndroidBrowserHistoryRepositorySession.java index e5267bd469d..c1433068ba8 100644 --- a/mobile/android/base/sync/repositories/android/AndroidBrowserHistoryRepositorySession.java +++ b/mobile/android/base/sync/repositories/android/AndroidBrowserHistoryRepositorySession.java @@ -56,7 +56,7 @@ public class AndroidBrowserHistoryRepositorySession extends AndroidBrowserReposi @Override protected String buildRecordString(Record record) { HistoryRecord hist = (HistoryRecord) record; - return hist.title + hist.histURI; + return hist.histURI; } @Override diff --git a/mobile/android/base/sync/repositories/domain/HistoryRecord.java b/mobile/android/base/sync/repositories/domain/HistoryRecord.java index fafac607ddd..daaf6e6f003 100644 --- a/mobile/android/base/sync/repositories/domain/HistoryRecord.java +++ b/mobile/android/base/sync/repositories/domain/HistoryRecord.java @@ -98,7 +98,8 @@ public class HistoryRecord extends Record { /** * We consider two history records to be congruent if they represent the - * same history record regardless of visits. + * same history record regardless of visits. Titles are allowed to differ, + * but the URI must be the same. */ @Override public boolean congruentWith(Object o) { @@ -109,8 +110,7 @@ public class HistoryRecord extends Record { if (!super.congruentWith(other)) { return false; } - return RepoUtils.stringsEqual(this.title, other.title) && - RepoUtils.stringsEqual(this.histURI, other.histURI); + return RepoUtils.stringsEqual(this.histURI, other.histURI); } @Override