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

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

Issue 291283002: Fix loadtimedata error message on non-Chrome OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: check valueExists instead of isChromeOS Created 6 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 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 // TODO(kochi): Generalize the notification as a component and put it 5 // TODO(kochi): Generalize the notification as a component and put it
6 // in js/cr/ui/notification.js . 6 // in js/cr/ui/notification.js .
7 7
8 cr.define('options', function() { 8 cr.define('options', function() {
9 /** @const */ var OptionsPage = options.OptionsPage; 9 /** @const */ var OptionsPage = options.OptionsPage;
10 /** @const */ var LanguageList = options.LanguageList; 10 /** @const */ var LanguageList = options.LanguageList;
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 } else if (languageCode in loadTimeData.getValue('uiLanguageCodeSet')) { 562 } else if (languageCode in loadTimeData.getValue('uiLanguageCodeSet')) {
563 if (cr.isChromeOS && UIAccountTweaks.loggedInAsGuest()) { 563 if (cr.isChromeOS && UIAccountTweaks.loggedInAsGuest()) {
564 // In the guest mode for ChromeOS, changing UI language does not make 564 // In the guest mode for ChromeOS, changing UI language does not make
565 // sense because it does not take effect after browser restart. 565 // sense because it does not take effect after browser restart.
566 uiLanguageButton.hidden = true; 566 uiLanguageButton.hidden = true;
567 uiLanguageMessage.hidden = true; 567 uiLanguageMessage.hidden = true;
568 } else { 568 } else {
569 uiLanguageButton.textContent = 569 uiLanguageButton.textContent =
570 loadTimeData.getString('displayInThisLanguage'); 570 loadTimeData.getString('displayInThisLanguage');
571 571
572 if (loadTimeData.getBoolean('secondaryUser')) { 572 if (loadTimeData.valueExists('secondaryUser') &&
573 loadTimeData.getBoolean('secondaryUser')) {
573 uiLanguageButton.disabled = true; 574 uiLanguageButton.disabled = true;
574 uiLanguageIndicator.setAttribute('controlled-by', 'shared'); 575 uiLanguageIndicator.setAttribute('controlled-by', 'shared');
575 } else { 576 } else {
576 uiLanguageButton.onclick = function(e) { 577 uiLanguageButton.onclick = function(e) {
577 chrome.send('uiLanguageChange', [languageCode]); 578 chrome.send('uiLanguageChange', [languageCode]);
578 }; 579 };
579 } 580 }
580 showMutuallyExclusiveNodes( 581 showMutuallyExclusiveNodes(
581 [uiLanguageButton, uiLanguageMessage, uiLanguageNotification], 0); 582 [uiLanguageButton, uiLanguageMessage, uiLanguageNotification], 0);
582 } 583 }
(...skipping 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 1328
1328 LanguageOptions.onComponentManagerInitialized = function(componentImes) { 1329 LanguageOptions.onComponentManagerInitialized = function(componentImes) {
1329 LanguageOptions.getInstance().appendComponentExtensionIme_(componentImes); 1330 LanguageOptions.getInstance().appendComponentExtensionIme_(componentImes);
1330 }; 1331 };
1331 1332
1332 // Export 1333 // Export
1333 return { 1334 return {
1334 LanguageOptions: LanguageOptions 1335 LanguageOptions: LanguageOptions
1335 }; 1336 };
1336 }); 1337 });
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