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

Side by Side Diff: chrome/common/extensions/docs/examples/api/fontSettings/js/util.js

Issue 11762004: Make favicons for about:history and about:bookmarks switch from lodpi to hidpi when dragging browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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 | « chrome/browser/resources/shared/js/util.js ('k') | 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 /** 5 /**
6 * The global object. 6 * The global object.
7 * @type {!Object} 7 * @type {!Object}
8 * @const 8 * @const
9 */ 9 */
10 var global = this; 10 var global = this;
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 * @param {string} value The value of the param. 219 * @param {string} value The value of the param.
220 * @return {string} The new URL. 220 * @return {string} The new URL.
221 */ 221 */
222 function appendParam(url, key, value) { 222 function appendParam(url, key, value) {
223 var param = encodeURIComponent(key) + '=' + encodeURIComponent(value); 223 var param = encodeURIComponent(key) + '=' + encodeURIComponent(value);
224 224
225 if (url.indexOf('?') == -1) 225 if (url.indexOf('?') == -1)
226 return url + '?' + param; 226 return url + '?' + param;
227 return url + '&' + param; 227 return url + '&' + param;
228 } 228 }
229
230 /**
231 * Creates a new URL for a favicon request.
232 * @param {string} url The url for the favicon.
233 * @param {number=} opt_size Optional preferred size of the favicon.
234 * @return {string} Updated URL for the favicon.
235 */
236 function getFaviconUrl(url, opt_size) {
237 var size = opt_size || 16;
238 return 'chrome://favicon/size/' + size + '@' +
239 window.devicePixelRatio + 'x/' + url;
240 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/shared/js/util.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698