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

Side by Side Diff: chrome/browser/resources/options/browser_options.js

Issue 12790013: Update optinos UI to display "/special/drive/root" as "Google Drive". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('options', function() { 5 cr.define('options', function() {
6 var OptionsPage = options.OptionsPage; 6 var OptionsPage = options.OptionsPage;
7 var ArrayDataModel = cr.ui.ArrayDataModel; 7 var ArrayDataModel = cr.ui.ArrayDataModel;
8 var RepeatingButton = cr.ui.RepeatingButton; 8 var RepeatingButton = cr.ui.RepeatingButton;
9 9
10 // 10 //
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 * @param {Event} event Change event. 855 * @param {Event} event Change event.
856 * @private 856 * @private
857 */ 857 */
858 onDefaultDownloadDirectoryChanged_: function(event) { 858 onDefaultDownloadDirectoryChanged_: function(event) {
859 $('downloadLocationPath').value = event.value.value; 859 $('downloadLocationPath').value = event.value.value;
860 if (cr.isChromeOS) { 860 if (cr.isChromeOS) {
861 // On ChromeOS, replace /special/drive with Drive for drive paths, and 861 // On ChromeOS, replace /special/drive with Drive for drive paths, and
862 // /home/chronos/user/Downloads with Downloads for local files. 862 // /home/chronos/user/Downloads with Downloads for local files.
863 // Also replace '/' with ' \u203a ' (angled quote sign) everywhere. 863 // Also replace '/' with ' \u203a ' (angled quote sign) everywhere.
864 var path = $('downloadLocationPath').value; 864 var path = $('downloadLocationPath').value;
865 path = path.replace(/^\/special\/drive/, 'Google Drive'); 865 path = path.replace(/^\/special\/drive\/root/, 'Google Drive');
866 path = path.replace(/^\/home\/chronos\/user\//, ''); 866 path = path.replace(/^\/home\/chronos\/user\//, '');
867 path = path.replace(/\//g, ' \u203a '); 867 path = path.replace(/\//g, ' \u203a ');
868 $('downloadLocationPath').value = path; 868 $('downloadLocationPath').value = path;
869 } 869 }
870 if (event.value.disabled) 870 if (event.value.disabled)
871 $('download-location-label').classList.add('disabled'); 871 $('download-location-label').classList.add('disabled');
872 else 872 else
873 $('download-location-label').classList.remove('disabled'); 873 $('download-location-label').classList.remove('disabled');
874 $('downloadLocationChangeButton').disabled = event.value.disabled; 874 $('downloadLocationChangeButton').disabled = event.value.disabled;
875 }, 875 },
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1440 BrowserOptions.getLoggedInUsername = function() { 1440 BrowserOptions.getLoggedInUsername = function() {
1441 return BrowserOptions.getInstance().username_; 1441 return BrowserOptions.getInstance().username_;
1442 }; 1442 };
1443 } 1443 }
1444 1444
1445 // Export 1445 // Export
1446 return { 1446 return {
1447 BrowserOptions: BrowserOptions 1447 BrowserOptions: BrowserOptions
1448 }; 1448 };
1449 }); 1449 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698