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

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

Issue 517413002: Compile chrome://settings, part 1: remove all warnings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: s/event/Event/ Created 6 years, 3 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
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 /** @const */ var Page = cr.ui.pageManager.Page; 6 /** @const */ var Page = cr.ui.pageManager.Page;
7 /** @const */ var PageManager = cr.ui.pageManager.PageManager; 7 /** @const */ var PageManager = cr.ui.pageManager.PageManager;
8 8
9 /** 9 /**
10 * Encapsulated handling of a search bubble. 10 * Encapsulated handling of a search bubble.
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 event.stopPropagation(); 562 event.stopPropagation();
563 event.preventDefault(); 563 event.preventDefault();
564 } 564 }
565 break; 565 break;
566 } 566 }
567 }, 567 },
568 }; 568 };
569 569
570 /** 570 /**
571 * Standardizes a user-entered text query by removing extra whitespace. 571 * Standardizes a user-entered text query by removing extra whitespace.
572 * @param {string} The user-entered text. 572 * @param {string} text The user-entered text.
573 * @return {string} The trimmed query. 573 * @return {string} The trimmed query.
574 */ 574 */
575 SearchPage.canonicalizeQuery = function(text) { 575 SearchPage.canonicalizeQuery = function(text) {
576 // Trim beginning and ending whitespace. 576 // Trim beginning and ending whitespace.
577 return text.replace(/^\s+|\s+$/g, ''); 577 return text.replace(/^\s+|\s+$/g, '');
578 }; 578 };
579 579
580 // Export 580 // Export
581 return { 581 return {
582 SearchPage: SearchPage 582 SearchPage: SearchPage
583 }; 583 };
584 584
585 }); 585 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698