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)); |
} |