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

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

Issue 66293005: drive: Add drive/trash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Exclude trash from search result Created 7 years, 1 month 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/search_metadata.cc
diff --git a/chrome/browser/chromeos/drive/search_metadata.cc b/chrome/browser/chromeos/drive/search_metadata.cc
index 505a1d087f725cbe64ec27b1dcaf959f080255dc..2026a6ab0a90bd140ab0df738eb1df3d24a5bbb7 100644
--- a/chrome/browser/chromeos/drive/search_metadata.cc
+++ b/chrome/browser/chromeos/drive/search_metadata.cc
@@ -118,9 +118,11 @@ bool IsEligibleEntry(const ResourceEntry& entry,
return cache_entry.is_present();
}
- // Exclude "drive", "drive/root", and "drive/other".
+ // Exclude "drive", "drive/root", "drive/other", "drive/trash" and its
+ // children.
if (it->GetID() == util::kDriveGrandRootLocalId ||
- entry.parent_local_id() == util::kDriveGrandRootLocalId) {
+ entry.parent_local_id() == util::kDriveGrandRootLocalId ||
+ entry.parent_local_id() == util::kDriveTrashDirLocalId) {
kinaba 2013/11/12 02:10:27 Is looking only the parent sufficient (i.e., what
hashimoto 2013/11/12 04:08:13 Hmm, recursively looking up parent does not look e
return false;
}

Powered by Google App Engine
This is Rietveld 408576698