Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: lib/utils.js

Issue 10585038: First-run page (revisited) (Closed)
Left Patch Set: Merged with existing version; i18n Created May 23, 2013, 9:09 a.m.
Right Patch Set: Created May 28, 2013, 2:09 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « lib/ui.js ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 } 440 }
441 finally 441 finally
442 { 442 {
443 if (keyInfo && !keyInfo.isNull()) 443 if (keyInfo && !keyInfo.isNull())
444 Utils.crypto.SECKEY_DestroySubjectPublicKeyInfo(keyInfo); 444 Utils.crypto.SECKEY_DestroySubjectPublicKeyInfo(keyInfo);
445 if (pubKey && !pubKey.isNull()) 445 if (pubKey && !pubKey.isNull())
446 Utils.crypto.SECKEY_DestroyPublicKey(pubKey); 446 Utils.crypto.SECKEY_DestroyPublicKey(pubKey);
447 if (context && !context.isNull()) 447 if (context && !context.isNull())
448 Utils.crypto.VFY_DestroyContext(context, true); 448 Utils.crypto.VFY_DestroyContext(context, true);
449 } 449 }
450 },
451
452 /**
453 * Returns the documentation link from the preferences.
454 */
455 getDocLink: function(/**String*/ linkID)
456 {
457 let {Prefs} = require("prefs");
458 let docLink = Prefs.documentation_link;
459 return docLink.replace(/%LINK%/g, linkID).replace(/%LANG%/g, Utils.appLocale );
450 } 460 }
451 }; 461 };
452 462
453 /** 463 /**
454 * A cache with a fixed capacity, newer entries replace entries that have been 464 * A cache with a fixed capacity, newer entries replace entries that have been
455 * stored first. 465 * stored first.
456 * @constructor 466 * @constructor
457 */ 467 */
458 function Cache(/**Integer*/ size) 468 function Cache(/**Integer*/ size)
459 { 469 {
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 Cu.reportError(e); 697 Cu.reportError(e);
688 // Expected, ctypes isn't supported in Gecko 1.9.2 698 // Expected, ctypes isn't supported in Gecko 1.9.2
689 return null; 699 return null;
690 } 700 }
691 }); 701 });
692 702
693 if ("@mozilla.org/messenger/headerparser;1" in Cc) 703 if ("@mozilla.org/messenger/headerparser;1" in Cc)
694 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen ger/headerparser;1", "nsIMsgHeaderParser"); 704 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen ger/headerparser;1", "nsIMsgHeaderParser");
695 else 705 else
696 Utils.headerParser = null; 706 Utils.headerParser = null;
LEFTRIGHT
« lib/ui.js ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld