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

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

Issue 14366010: drive: Fix a bug where special directories are suggested from autocomplete (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/search_metadata_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 dac885ef4ab6f5798e6bb3f953a5397b6f422cac..39dc4f5249b55740e201bf8b85f97a5289d31ded 100644
--- a/chrome/browser/chromeos/drive/search_metadata.cc
+++ b/chrome/browser/chromeos/drive/search_metadata.cc
@@ -89,6 +89,12 @@ bool IsEligibleEntry(const DriveEntryProto& entry, int options) {
if (options & SEARCH_METADATA_SHARED_WITH_ME)
return entry.shared_with_me();
+ // Exclude "drive", "drive/root", and "drive/other".
+ if (entry.resource_id() == util::kDriveGrandRootSpecialResourceId ||
+ entry.parent_resource_id() == util::kDriveGrandRootSpecialResourceId) {
+ return false;
+ }
+
return true;
}
« no previous file with comments | « no previous file | chrome/browser/chromeos/drive/search_metadata_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698