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

Unified Diff: chrome/browser/sync_file_system/drive_file_sync_service.cc

Issue 11453007: Remote changes should be appended even if we already have changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/drive_file_sync_service.cc b/chrome/browser/sync_file_system/drive_file_sync_service.cc
index 2b188c0e118c90fcbc4dabd676f8d944284416de..3ca2cfe89fd03f3dbcc76bc5fd3404d5af7e84de 100644
--- a/chrome/browser/sync_file_system/drive_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/drive_file_sync_service.cc
@@ -1362,6 +1362,10 @@ bool DriveFileSyncService::AppendNewRemoteChange(
pending_changes_.insert(ChangeQueueItem(changestamp, sync_type, url));
DCHECK(inserted_to_queue.second);
+ DVLOG(3) << "Append remote change: " << path.value()
+ << "@" << changestamp << " "
+ << file_change.DebugString();
+
(*path_to_change)[path] = RemoteChange(
changestamp, entry.resource_id(), url, file_change,
inserted_to_queue.first);
@@ -1445,14 +1449,16 @@ void DriveFileSyncService::DidFetchChangesForIncrementalSync(
for (iterator itr = changes->entries().begin();
itr != changes->entries().end(); ++itr) {
const google_apis::DocumentEntry& entry = **itr;
- DVLOG(3) << " change:" << entry.title();
GURL origin;
if (!GetOriginForEntry(entry, &origin))
continue;
- has_new_changes = has_new_changes ||
+ DVLOG(3) << " * change:" << entry.title()
+ << (entry.deleted() ? " (deleted)" : " ")
+ << "[" << origin.spec() << "]";
+ has_new_changes =
AppendNewRemoteChange(origin, entry, entry.changestamp(),
- REMOTE_SYNC_TYPE_INCREMENTAL);
+ REMOTE_SYNC_TYPE_INCREMENTAL) || has_new_changes;
}
GURL next_feed;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698