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

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

Issue 520623002: Remove Files.app's own profile badge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 4 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 | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
diff --git a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
index 6f11bfcf3a52a6c30a1618f6b42ccd990e59b1a2..ed378b68f267131bf4e3c3f54414742ae261437d 100644
--- a/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
+++ b/ui/file_manager/file_manager/foreground/js/ui/file_manager_ui.js
@@ -137,7 +137,6 @@ var FileManagerUI = function(element, dialogType) {
Object.seal(this);
// Initialize the header.
- this.updateProfileBadge();
this.element_.querySelector('#app-name').innerText =
chrome.runtime.getManifest().name;
@@ -237,39 +236,6 @@ FileManagerUI.prototype.initAdditionalUI = function() {
};
/**
- * Updates visibility and image of the profile badge.
- */
-FileManagerUI.prototype.updateProfileBadge = function() {
- if (this.dialogType_ !== DialogType.FULL_PAGE)
- return;
-
- chrome.fileBrowserPrivate.getProfiles(function(profiles,
- currentId,
- displayedId) {
- var profileImage;
- if (currentId !== displayedId) {
- for (var i = 0; i < profiles.length; i++) {
- if (profiles[i].profileId === currentId) {
- profileImage = profiles[i].profileImage;
- break;
- }
- }
- }
- var profileBadge = this.element_.querySelector('#profile-badge');
- if (profileImage) {
- profileBadge.style.background =
- '-webkit-image-set(' +
- 'url(' + profileImage.scale1xUrl + ') 1x,' +
- 'url(' + profileImage.scale2xUrl + ') 2x) no-repeat center';
- profileBadge.hidden = false;
- } else {
- profileBadge.style.background = '';
- profileBadge.hidden = true;
- }
- }.bind(this));
-};
-
-/**
* Handles click event on the search button.
* @param {Event} event Click event.
* @private
« no previous file with comments | « ui/file_manager/file_manager/foreground/js/file_manager.js ('k') | ui/file_manager/file_manager/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698