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

Unified Diff: chrome/browser/chromeos/drive/file_change.cc

Issue 658013002: Changed api to notify when watched directory is deleted. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed nit. Created 6 years, 2 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_change.cc
diff --git a/chrome/browser/chromeos/drive/file_change.cc b/chrome/browser/chromeos/drive/file_change.cc
index 0649d377e0d4f635d545162f308bc97fa6db75c5..10da6bbca9c63a63a52c0360389ab4c1b3788094 100644
--- a/chrome/browser/chromeos/drive/file_change.cc
+++ b/chrome/browser/chromeos/drive/file_change.cc
@@ -115,10 +115,11 @@ void FileChange::Update(const base::FilePath file_path,
void FileChange::Update(const base::FilePath file_path,
const ResourceEntry& entry,
FileChange::ChangeType change) {
- FileType type =
- entry.deleted() ? FILE_TYPE_UNKNOWN : entry.file_info().is_directory()
- ? FILE_TYPE_DIRECTORY
- : FILE_TYPE_FILE;
+ FileType type = !entry.has_file_info() ? FILE_TYPE_UNKNOWN
+ : entry.file_info().is_directory()
+ ? FILE_TYPE_DIRECTORY
+ : FILE_TYPE_FILE;
+
Update(file_path, type, change);
}

Powered by Google App Engine
This is Rietveld 408576698