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

Unified Diff: ui/file_manager/file_manager/background/js/entry_location_impl.js

Issue 2839863002: Add Team Drive subtree to the directory list view. (Closed)
Patch Set: Fix FileManagerJsTest.{NavigationListModelTest,ProvidersModel}. Created 3 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
Index: ui/file_manager/file_manager/background/js/entry_location_impl.js
diff --git a/ui/file_manager/file_manager/background/js/entry_location_impl.js b/ui/file_manager/file_manager/background/js/entry_location_impl.js
index 34713d9ff6265000e6bebb34e51d5b37e80cb2af..73611343d97a6a55a102f7587e215c0c9b7750ac 100644
--- a/ui/file_manager/file_manager/background/js/entry_location_impl.js
+++ b/ui/file_manager/file_manager/background/js/entry_location_impl.js
@@ -8,12 +8,14 @@
*
* @param {!VolumeInfo} volumeInfo Volume information.
* @param {VolumeManagerCommon.RootType} rootType Root type.
+ * @param {VolumeManagerCommon.EntryType} entryType Entry type.
* @param {boolean} isRootEntry Whether the entry is root entry or not.
* @param {boolean} isReadOnly Whether the entry is read only or not.
* @constructor
* @implements {EntryLocation}
*/
-function EntryLocationImpl(volumeInfo, rootType, isRootEntry, isReadOnly) {
+function EntryLocationImpl(
+ volumeInfo, rootType, entryType, isRootEntry, isReadOnly) {
/** @override */
this.volumeInfo = volumeInfo;
@@ -40,5 +42,18 @@ function EntryLocationImpl(volumeInfo, rootType, isRootEntry, isReadOnly) {
/** @override */
this.isReadOnly = isReadOnly;
+ /** @type{boolean} */
+ this.isTeamDriveRoot =
+ (entryType == VolumeManagerCommon.EntryType.TEAM_DRIVE_ROOT);
+
+ /** @type{VolumeManagerCommon.EntryType} */
+ this.entryType = entryType;
+
+ /** @type{boolean} */
+ this.hasFixedLabel =
+ entryType === VolumeManagerCommon.EntryType.TEAM_DRIVES_GRAND_ROOT ||
+ entryType === VolumeManagerCommon.EntryType.VOLUME_ROOT ||
+ entryType === VolumeManagerCommon.EntryType.FAKE_ENTRY;
+
Object.freeze(this);
}

Powered by Google App Engine
This is Rietveld 408576698