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

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

Issue 13456002: drive: Fills no-parent entiries in "/drive/other". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add a comment in ConvertResourceEntryToDriveEntryProto(). Created 7 years, 9 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/drive_file_system.cc
diff --git a/chrome/browser/chromeos/drive/drive_file_system.cc b/chrome/browser/chromeos/drive/drive_file_system.cc
index 5ef2702467fd6ff01d5e21bf2698a90469932ac9..224349097ff586a7c8aca645ea03004d9f31532b 100644
--- a/chrome/browser/chromeos/drive/drive_file_system.cc
+++ b/chrome/browser/chromeos/drive/drive_file_system.cc
@@ -1014,6 +1014,11 @@ void DriveFileSystem::RefreshDirectoryAfterGetEntryInfo(
callback.Run(DRIVE_FILE_ERROR_NOT_A_DIRECTORY);
return;
}
+ if (util::IsSpecialResourceId(entry_proto->resource_id())) {
+ // Do not load special directories. Just return.
+ callback.Run(DRIVE_FILE_OK);
+ return;
+ }
change_list_loader_->LoadDirectoryFromServer(
entry_proto->resource_id(),
@@ -1110,17 +1115,7 @@ void DriveFileSystem::OnSearch(bool shared_with_me,
should_run_callback,
callback);
- // Some entries (e.g. shared_with_me files) are not tracked in
- // DriveResourceMetadata, so that we skip RefreshEntry() and call the
- // callback directly.
- if (!shared_with_me) {
- resource_metadata_->RefreshEntry(entry_proto, entry_info_callback);
- } else {
- entry_info_callback.Run(
- DRIVE_FILE_OK,
- base::FilePath::FromUTF8Unsafe(entry_proto.base_name()),
- scoped_ptr<DriveEntryProto>(new DriveEntryProto(entry_proto)));
- }
+ resource_metadata_->RefreshEntry(entry_proto, entry_info_callback);
}
}

Powered by Google App Engine
This is Rietveld 408576698