Chromium Code Reviews| Index: chrome/browser/sync_file_system/fake_remote_change_processor.cc |
| diff --git a/chrome/browser/sync_file_system/fake_remote_change_processor.cc b/chrome/browser/sync_file_system/fake_remote_change_processor.cc |
| index 2cf436a9ae8c76a0790e681f5b783f65c710b98b..35906cc4e795d45c5a9c3d9c86a51ab97282cdb7 100644 |
| --- a/chrome/browser/sync_file_system/fake_remote_change_processor.cc |
| +++ b/chrome/browser/sync_file_system/fake_remote_change_processor.cc |
| @@ -24,10 +24,23 @@ void FakeRemoteChangeProcessor::PrepareForProcessRemoteChange( |
| const fileapi::FileSystemURL& url, |
| const std::string& service_name, |
| const PrepareChangeCallback& callback) { |
| + SyncFileMetadata local_metadata; |
| + |
| + URLToFileChangesMap::iterator found = applied_changes_.find(url); |
| + if (found != applied_changes_.end()) { |
| + DCHECK(!found->second.empty()); |
| + const FileChange& applied_change = found->second.back(); |
| + if (applied_change.IsAddOrUpdate()) { |
| + local_metadata = SyncFileMetadata( |
| + applied_change.file_type(), |
| + 100 /* size */, |
| + base::Time::Now()); |
| + } |
| + } |
|
kinuko
2013/02/28 13:58:30
It's ok for this change, but maybe we should rathe
tzik
2013/02/28 14:00:38
OK, I'll do it next patch.
|
| base::MessageLoopProxy::current()->PostTask( |
| FROM_HERE, |
| base::Bind(callback, SYNC_STATUS_OK, |
| - SyncFileMetadata(), FileChangeList())); |
| + local_metadata, FileChangeList())); |
| } |
| void FakeRemoteChangeProcessor::ApplyRemoteChange( |