summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 16:42:34 +0000
committerbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-19 16:42:34 +0000
commitdd30ea276696692d807ab01752f8d11efed2c252 (patch)
treebb5b3c32adae91696c275426f0d9d35a7a15821e
parentb945735d8f57801fc52df4d7f5693b6dba8c8438 (diff)
downloadchromium_src-dd30ea276696692d807ab01752f8d11efed2c252.zip
chromium_src-dd30ea276696692d807ab01752f8d11efed2c252.tar.gz
chromium_src-dd30ea276696692d807ab01752f8d11efed2c252.tar.bz2
Display File shelf instead of Chromebook in breadcrumb.
BUG=chromium-os:25007 TEST=Open file manager and select Chromebook in the left panel. It should say "File shelf" in the breadcrumbs. Review URL: http://codereview.chromium.org/9227009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118305 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd3
-rw-r--r--chrome/browser/extensions/extension_file_browser_private_api.cc1
-rw-r--r--chrome/browser/resources/file_manager/js/file_manager.js10
3 files changed, 13 insertions, 1 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index 8ba44aa..456aaf6 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -9781,6 +9781,9 @@ Some features may be unavailable. Please check that the profile exists and you
<message name="IDS_FILE_BROWSER_CHROMEBOOK_DIRECTORY_LABEL" desc="Chromebook local directory label.">
Chromebook
</message>
+ <message name="IDS_FILE_BROWSER_CHROMEBOOK_DIRECTORY_BREADCRUMB_LABEL" desc="Chromebook local direcotry breadcrumb label.">
+ File shelf
+ </message>
<message name="IDS_FILE_BROWSER_ADD_DRIVE" desc="Label to add a new drive.">
Add a drive
</message>
diff --git a/chrome/browser/extensions/extension_file_browser_private_api.cc b/chrome/browser/extensions/extension_file_browser_private_api.cc
index e2473b2..76cfff2 100644
--- a/chrome/browser/extensions/extension_file_browser_private_api.cc
+++ b/chrome/browser/extensions/extension_file_browser_private_api.cc
@@ -1536,6 +1536,7 @@ bool FileDialogStringsFunction::RunImpl() {
SET_STRING(IDS_FILE_BROWSER, ARCHIVE_DIRECTORY_LABEL);
SET_STRING(IDS_FILE_BROWSER, REMOVABLE_DIRECTORY_LABEL);
SET_STRING(IDS_FILE_BROWSER, CHROMEBOOK_DIRECTORY_LABEL);
+ SET_STRING(IDS_FILE_BROWSER, CHROMEBOOK_DIRECTORY_BREADCRUMB_LABEL);
SET_STRING(IDS_FILE_BROWSER, NAME_COLUMN_LABEL);
SET_STRING(IDS_FILE_BROWSER, SIZE_COLUMN_LABEL);
SET_STRING(IDS_FILE_BROWSER, TYPE_COLUMN_LABEL);
diff --git a/chrome/browser/resources/file_manager/js/file_manager.js b/chrome/browser/resources/file_manager/js/file_manager.js
index 940cb98..915afde 100644
--- a/chrome/browser/resources/file_manager/js/file_manager.js
+++ b/chrome/browser/resources/file_manager/js/file_manager.js
@@ -2317,7 +2317,15 @@ FileManager.prototype = {
var div = doc.createElement('div');
div.className = 'breadcrumb-path';
- div.textContent = i == 0 ? this.getRootLabel_(path) : pathName;
+ if (i == 0) {
+ // Need to say "File shelf" instead of "Chromebook" in the breadcrumb
+ // after select Chromebook in the left panel.
+ div.textContent = pathName == DirectoryModel.DOWNLOADS_DIRECTORY ?
+ str('CHROMEBOOK_DIRECTORY_BREADCRUMB_LABEL') :
+ this.getRootLabel_(path);
+ } else {
+ div.textContent = pathName;
+ }
path = path + '/';
div.path = path;