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

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

Issue 10802060: Ignore file URLs from being synced (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | chrome/browser/sync/glue/typed_url_model_associator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/typed_url_change_processor.cc
===================================================================
--- chrome/browser/sync/glue/typed_url_change_processor.cc (revision 149878)
+++ chrome/browser/sync/glue/typed_url_change_processor.cc (working copy)
@@ -125,6 +125,10 @@
return true;
DCHECK(!visit_vector.empty());
+ // Ignore URLs of local files.
+ if (url.url().SchemeIsFile())
+ return true;
+
syncer::WriteNode update_node(trans);
syncer::BaseNode::InitByLookupResult result =
update_node.InitByClientTagLookup(syncer::TYPED_URLS, tag);
@@ -286,9 +290,9 @@
const sync_pb::TypedUrlSpecifics& typed_url(
sync_node.GetTypedUrlSpecifics());
DCHECK(typed_url.visits_size());
- // Ignore blank URLs - these should never happen in practice, but they
- // can sneak into the data via browser import.
- if (typed_url.url().empty())
+ // Ignore blank URLs or local file URLs- these should never happen
+ // in practice, but they can sneak into the data via browser import.
+ if (typed_url.url().empty() || GURL(typed_url.url()).SchemeIsFile())
continue;
sync_pb::TypedUrlSpecifics filtered_url =
model_associator_->FilterExpiredVisits(typed_url);
« no previous file with comments | « no previous file | chrome/browser/sync/glue/typed_url_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698