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

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

Issue 405743002: Typecheck some of ui/webui/resources/js/ with Closure compiler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cr.isMac fix 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 unified diff | Download patch | Annotate | Revision Log
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 Page = cr.ui.pageManager.Page; 7 var Page = cr.ui.pageManager.Page;
8 var PageManager = cr.ui.pageManager.PageManager; 8 var PageManager = cr.ui.pageManager.PageManager;
9 var ArrayDataModel = cr.ui.ArrayDataModel; 9 var ArrayDataModel = cr.ui.ArrayDataModel;
10 var RepeatingButton = cr.ui.RepeatingButton; 10 var RepeatingButton = cr.ui.RepeatingButton;
(...skipping 1327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1338 * @return {Object} A profile info object. 1338 * @return {Object} A profile info object.
1339 * @private 1339 * @private
1340 */ 1340 */
1341 getCurrentProfile_: function() { 1341 getCurrentProfile_: function() {
1342 for (var i = 0; i < $('profiles-list').dataModel.length; i++) { 1342 for (var i = 0; i < $('profiles-list').dataModel.length; i++) {
1343 var profile = $('profiles-list').dataModel.item(i); 1343 var profile = $('profiles-list').dataModel.item(i);
1344 if (profile.isCurrentProfile) 1344 if (profile.isCurrentProfile)
1345 return profile; 1345 return profile;
1346 } 1346 }
1347 1347
1348 assert(false, 1348 assertNotReached('There should always be a current profile.');
1349 'There should always be a current profile, but none found.');
1350 }, 1349 },
1351 1350
1352 /** 1351 /**
1353 * Propmpts user to confirm deletion of the profile for this browser 1352 * Propmpts user to confirm deletion of the profile for this browser
1354 * window. 1353 * window.
1355 * @private 1354 * @private
1356 */ 1355 */
1357 deleteCurrentProfile_: function() { 1356 deleteCurrentProfile_: function() {
1358 ManageProfileOverlay.showDeleteDialog(this.getCurrentProfile_()); 1357 ManageProfileOverlay.showDeleteDialog(this.getCurrentProfile_());
1359 }, 1358 },
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 BrowserOptions.getLoggedInUsername = function() { 1882 BrowserOptions.getLoggedInUsername = function() {
1884 return BrowserOptions.getInstance().username_; 1883 return BrowserOptions.getInstance().username_;
1885 }; 1884 };
1886 } 1885 }
1887 1886
1888 // Export 1887 // Export
1889 return { 1888 return {
1890 BrowserOptions: BrowserOptions 1889 BrowserOptions: BrowserOptions
1891 }; 1890 };
1892 }); 1891 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp4/tile_page.js ('k') | chrome/test/data/webui/link_controller_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698