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

Unified Diff: ui/file_manager/file_manager/foreground/js/navigation_list_model.js

Issue 1134213006: Hide the "Add new services" menu from Files app when running as dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed tests. Created 5 years, 7 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/foreground/js/navigation_list_model.js
diff --git a/ui/file_manager/file_manager/foreground/js/navigation_list_model.js b/ui/file_manager/file_manager/foreground/js/navigation_list_model.js
index 34e36be7b69480c1cfccb926cebf43cc038b443a..51d6653f7a6b485d3a8e50b2d4234af4ff9053e3 100644
--- a/ui/file_manager/file_manager/foreground/js/navigation_list_model.js
+++ b/ui/file_manager/file_manager/foreground/js/navigation_list_model.js
@@ -116,7 +116,7 @@ NavigationModelMenuItem.prototype = /** @struct */ {
* @param {!VolumeManagerWrapper} volumeManager VolumeManagerWrapper instance.
* @param {(!cr.ui.ArrayDataModel|!FolderShortcutsDataModel)} shortcutListModel
* The list of folder shortcut.
- * @param {!NavigationModelMenuItem} menuModel Menu button at the end of the
+ * @param {NavigationModelMenuItem} menuModel Menu button at the end of the
* list.
* @constructor
* @extends {cr.EventTarget}
@@ -137,7 +137,7 @@ function NavigationListModel(volumeManager, shortcutListModel, menuModel) {
this.shortcutListModel_ = shortcutListModel;
/**
- * @private {!NavigationModelMenuItem}
+ * @private {NavigationModelMenuItem}
* @const
*/
this.menuModel_ = menuModel;
@@ -309,7 +309,7 @@ NavigationListModel.prototype.item = function(index) {
*/
NavigationListModel.prototype.length_ = function() {
return this.volumeList_.length + this.shortcutList_.length
- + 1 /* for button menu */;
+ + (this.menuModel_ ? 1 : 0);
};
/**

Powered by Google App Engine
This is Rietveld 408576698