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

Side by Side Diff: chrome/browser/resources/settings/basic_page/basic_page.js

Issue 2905393002: MD Settings: URL encode text queries before adding them to the URL. (Closed)
Patch Set: Nit. Created 3 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 /** 5 /**
6 * @fileoverview 6 * @fileoverview
7 * 'settings-basic-page' is the settings page containing the actual settings. 7 * 'settings-basic-page' is the settings page containing the actual settings.
8 */ 8 */
9 Polymer({ 9 Polymer({
10 is: 'settings-basic-page', 10 is: 'settings-basic-page',
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 whenSearchDone.push(this.$$('#advancedPageTemplate').get().then( 129 whenSearchDone.push(this.$$('#advancedPageTemplate').get().then(
130 function(advancedPage) { 130 function(advancedPage) {
131 return settings.getSearchManager().search(query, advancedPage); 131 return settings.getSearchManager().search(query, advancedPage);
132 })); 132 }));
133 } 133 }
134 134
135 return Promise.all(whenSearchDone).then(function(requests) { 135 return Promise.all(whenSearchDone).then(function(requests) {
136 // Combine the SearchRequests results to a single SearchResult object. 136 // Combine the SearchRequests results to a single SearchResult object.
137 return { 137 return {
138 canceled: requests.some(function(r) { return r.canceled; }), 138 canceled: requests.some(function(r) { return r.canceled; }),
139 didFindMatches: requests.every(function(r) { 139 didFindMatches: requests.some(function(r) {
140 return !r.didFindMatches(); 140 return r.didFindMatches();
141 }), 141 }),
142 // All requests correspond to the same user query, so only need to check 142 // All requests correspond to the same user query, so only need to check
143 // one of them. 143 // one of them.
144 wasClearSearch: requests[0].isSame(''), 144 wasClearSearch: requests[0].isSame(''),
145 }; 145 };
146 }); 146 });
147 }, 147 },
148 148
149 // <if expr="chromeos"> 149 // <if expr="chromeos">
150 /** 150 /**
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 241
242 /** 242 /**
243 * @param {boolean} opened Whether the menu is expanded. 243 * @param {boolean} opened Whether the menu is expanded.
244 * @return {string} Icon name. 244 * @return {string} Icon name.
245 * @private 245 * @private
246 */ 246 */
247 getArrowIcon_: function(opened) { 247 getArrowIcon_: function(opened) {
248 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down'; 248 return opened ? 'cr:arrow-drop-up' : 'cr:arrow-drop-down';
249 }, 249 },
250 }); 250 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698