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

Unified Diff: chrome/browser/chromeos/drive/file_system/touch_operation.cc

Issue 343073003: Files.app: Provide detailed change information on onDirectoryChanged event (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
Index: chrome/browser/chromeos/drive/file_system/touch_operation.cc
diff --git a/chrome/browser/chromeos/drive/file_system/touch_operation.cc b/chrome/browser/chromeos/drive/file_system/touch_operation.cc
index bb1b23dde33d75581647c5c7448649206b722648..af71e8198407a80dfc9b19263ccb20fcb1a7127b 100644
--- a/chrome/browser/chromeos/drive/file_system/touch_operation.cc
+++ b/chrome/browser/chromeos/drive/file_system/touch_operation.cc
@@ -8,6 +8,7 @@
#include "base/files/file_path.h"
#include "base/sequenced_task_runner.h"
#include "base/time/time.h"
+#include "chrome/browser/chromeos/drive/file_change.h"
#include "chrome/browser/chromeos/drive/file_errors.h"
#include "chrome/browser/chromeos/drive/file_system/operation_observer.h"
#include "chrome/browser/chromeos/drive/resource_metadata.h"
@@ -88,8 +89,13 @@ void TouchOperation::TouchFileAfterUpdateLocalState(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(!callback.is_null());
+ FileChange changed_files;
+ changed_files.Update(file_path,
+ FileChange::FILE_TYPE_FILE,
+ FileChange::ADD_OR_UPDATE);
+
if (error == FILE_ERROR_OK) {
- observer_->OnDirectoryChangedByOperation(file_path.DirName());
+ observer_->OnDirectoryChangedByOperation(changed_files);
observer_->OnEntryUpdatedByOperation(*local_id);
}
callback.Run(error);

Powered by Google App Engine
This is Rietveld 408576698