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

Unified Diff: chrome/browser/sync_file_system/local/local_file_sync_service.cc

Issue 98633003: SyncFS v2: Add modest logging for ApplyLocalChange, ApplyRemoteChange (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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
Index: chrome/browser/sync_file_system/local/local_file_sync_service.cc
diff --git a/chrome/browser/sync_file_system/local/local_file_sync_service.cc b/chrome/browser/sync_file_system/local/local_file_sync_service.cc
index 6b5a0117aebc5b2cf0f5dc450ce776911c6c87bd..7441b27d64c01949128a06141af7b506d07a9eb7 100644
--- a/chrome/browser/sync_file_system/local/local_file_sync_service.cc
+++ b/chrome/browser/sync_file_system/local/local_file_sync_service.cc
@@ -247,9 +247,16 @@ void LocalFileSyncService::ApplyRemoteChange(
const FileSystemURL& url,
const SyncStatusCallback& callback) {
DCHECK(ContainsKey(origin_to_contexts_, url.origin()));
+ util::Log(logging::LOG_INFO, FROM_HERE,
+ "[Remote->Local] ApplyRemoteChange: %s on %s",
+ change.DebugString().c_str(),
+ url.DebugString().c_str());
+
sync_context_->ApplyRemoteChange(
origin_to_contexts_[url.origin()],
- change, local_path, url, callback);
+ change, local_path, url,
+ base::Bind(&LocalFileSyncService::DidApplyRemoteChange, AsWeakPtr(),
+ callback));
}
void LocalFileSyncService::FinalizeRemoteSync(
@@ -363,6 +370,15 @@ void LocalFileSyncService::RunLocalSyncCallback(
callback.Run(status, url);
}
+void LocalFileSyncService::DidApplyRemoteChange(
+ const SyncStatusCallback& callback,
+ SyncStatusCode status) {
+ util::Log(logging::LOG_INFO, FROM_HERE,
+ "[Remote->Local] ApplyRemoteChange finished --> %s",
+ SyncStatusCodeToString(status));
+ callback.Run(status);
+}
+
void LocalFileSyncService::DidGetFileForLocalSync(
SyncStatusCode status,
const LocalFileSyncInfo& sync_file_info,

Powered by Google App Engine
This is Rietveld 408576698