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

Unified Diff: chrome/browser/sync_file_system/drive_backend/sync_engine.cc

Issue 98803002: Dispatch FileStatus change events for LocalToRemote sync too (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | « chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc ('k') | 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_backend/sync_engine.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index 8734185934a49717b00af365065250608733fe0b..3ff1853c63436d364111000ee1bc4e4d31a807c3 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -434,6 +434,22 @@ void SyncEngine::DidProcessRemoteChange(RemoteToLocalSyncer* syncer,
void SyncEngine::DidApplyLocalChange(LocalToRemoteSyncer* syncer,
const SyncStatusCallback& callback,
SyncStatusCode status) {
+ if ((status == SYNC_STATUS_OK || status == SYNC_STATUS_RETRY) &&
+ syncer->url().is_valid() &&
+ syncer->sync_action() != SYNC_ACTION_NONE) {
+ fileapi::FileSystemURL updated_url = syncer->url();
+ if (!syncer->target_path().empty()) {
+ updated_url = CreateSyncableFileSystemURL(syncer->url().origin(),
+ syncer->target_path());
+ }
+ FOR_EACH_OBSERVER(FileStatusObserver,
+ file_status_observers_,
+ OnFileStatusChanged(updated_url,
+ SYNC_FILE_STATUS_SYNCED,
+ syncer->sync_action(),
+ SYNC_DIRECTION_LOCAL_TO_REMOTE));
+ }
+
if (status != SYNC_STATUS_OK &&
status != SYNC_STATUS_NO_CHANGE_TO_SYNC) {
callback.Run(status);
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/local_to_remote_syncer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698