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

Unified Diff: chrome/browser/sync/glue/typed_url_change_processor.cc

Issue 8289026: Correctly handle expired and truncated visits in typed url sync (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed compilation error. Created 9 years, 2 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
Index: chrome/browser/sync/glue/typed_url_change_processor.cc
diff --git a/chrome/browser/sync/glue/typed_url_change_processor.cc b/chrome/browser/sync/glue/typed_url_change_processor.cc
index 9ed54a339a28c45b158d0a0761b486a4c1f5cfbe..e6b62bc69891a5d82e5fd514a8775b410d7540ae 100644
--- a/chrome/browser/sync/glue/typed_url_change_processor.cc
+++ b/chrome/browser/sync/glue/typed_url_change_processor.cc
@@ -96,6 +96,7 @@ void TypedUrlChangeProcessor::HandleURLsModified(
bool TypedUrlChangeProcessor::CreateOrUpdateSyncNode(
history::URLRow url, sync_api::WriteTransaction* trans) {
+ DCHECK_GT(url.typed_count(), 0);
// Get the visits for this node.
history::VisitVector visit_vector;
if (!TypedUrlModelAssociator::FixupURLAndGetVisits(
@@ -185,6 +186,7 @@ bool TypedUrlChangeProcessor::ShouldSyncVisit(
// tend to be more broadly distributed such that there's no need to sync up
// every visit to preserve their relative ordering.
return (transition == content::PAGE_TRANSITION_TYPED &&
+ typed_count > 0 &&
(typed_count < kTypedUrlVisitThrottleThreshold ||
(typed_count % kTypedUrlVisitThrottleMultiple) == 0));
}
« no previous file with comments | « chrome/browser/sync/glue/sync_backend_registrar.cc ('k') | chrome/browser/sync/glue/typed_url_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698